vertx と JasperReports を使用したいのですが、接続を作成してテストします。すべて問題ありませんが、fillReport メソッド (最後の接続は接続) を使用してジャスパー レポートを入力すると、エラーが表示されます。
タイプ JasperFillManager のメソッド fillReport(JasperReport, Map< String,Object >, Connection) は、引数 (JasperReport, null, Class < connection>) には適用されません。
SQLConnect をキャストして connect する方法はありますか?
これが私のコードです:
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);}
よろしく。