Jasper Raport bug on mac



net.sf.jasperreports.engine.query.JRJdbcQueryExecuter <init>


WARNING: The supplied java.sql.Connection object is null.



I've been using Jaspersoft paired with Java beans for my reports and everything is going well. It was only when I checked the logs, which can be viewed by the client, that I noticed that there is something wrong. In the code below, the highlighted line, it checks if there is an SQL connection.  
Since I don't use SQL it returns a warning message:  JRJdbcQueryExecuter - The supplied java.sql.Connection object is null. 
How can the SQL connection validation be prevented?


this part of code works for me !!!

JasperDesign jd = JRXmlLoader.load("C:\\Users\\USER\\DOCUMENTS\\ATHLETICS\\participants.jrxml");
        String sql = "SET @s:=0; select @s:=@s+1 POSITION, CHESTNUMBER AS 'CHEST NUMBER', FULLNAMES AS 'PARTICIPANT', TEAM AS 'TEAM',"
                + " PHONE AS 'PHONE', IDNUMBER AS 'NATIONAL ID', FINISHTIME AS 'FINISH TIME', STATUS AS 'STATUS' FROM PARTICIPANTS";
        JRDesignQuery newQuery = new JRDesignQuery();
        newQuery.setText(sql);
        jd.setQuery(newQuery);
        JasperReport jr = JasperCompileManager.compileReport(jd);
        JasperPrint jp = JasperFillManager.fillReport(jr, null, con);
        JasperViewer.viewReport(jp, false);

Commentaires

Posts les plus consultés de ce blog

-Xlint:deprecation | deprecated API | use unchecked or unsafe operations

Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: MinuteOfHour