vertxとJasperReportsを使用したいのですが、接続を作成してテストしても問題ありませんが、fillReportメソッドを使用してジャスパーレポートを埋めたい場合は)それはエラーを示しています。JasperReport(JasperFillManagerは、引数には適用されませんタイプにVertx:fillReportからSQLConnectionを読み取ることができません
方法fillReport(JasperReport、地図<文字列、オブジェクト>、接続)、ヌル、クラス<接続>)。
どのように私はSQLConnectを接続する必要がありますか?
AsyncSQLClient client = MySQLClient.createShared(vertx, mySQLClientConfig);
client.getConnection(res -> {
if (res.succeeded()) {
SQLConnection connection = res.result();
try{
String report = "C:\\Users\\paths\\Test1.jrxml";
JasperReport Jasp = JasperCompileManager.compileReport(report);
JasperPrint JASP_PRINT = JasperFillManager.fillReport(Jasp, null, connection);
JasperViewer.viewReport(JASP_PRINT);
}
catch(Exception ex){System.out.println(ex);}
よろしく:
は、ここに私のコードです。
ジャスパーレポートでvert.xを使用する方法がないので、@alexvetterに感謝しますか? – zackzulg
私の答えを編集しました。あなたの質問に答えてくれることを願っています。 – alexvetter
助けてくれてありがとう、私は労働者を見て、良い一日を持っています@alexvetter – zackzulg