Report custom class no longer loading?

I had a custom report class that was working fine under 6.4. I have been upgrading steadily through the 6.5 line, but I was not diligent in my regression testing. :-/

I just tried to run my custom report under 6.5.3 and I am getting the following error:public://attachments/05ff77f3b3a6cb73dbe8c0394376bed9.jpg
This class is in the core module (under core->src->com.paslists->reporting in Idea). What have I done wrong? Why can’t the class be found any more?

05ff77f3b3a6cb73dbe8c0394376bed9

A little more info… I put a breakpoint in CustomFormatter.generateReportWithClass. This is the underlying exception when instantiating my custom report class:

Class com.haulmont.reports.libintegration.CustomFormatter can not access a member of class com.paslists.reporting.JasperSQLReportFormatter with modifiers ""[
/pre]

I never needed a class constructor before.   I added one like this but it made no difference:

public JasperSQLReportFormatter JasperSqlReportFormatter() {
        return new JasperSQLReportFormatter();
    }
 
It appears this is not sufficient.  What should I be using for a constructor?
                

Hi Eric,

Please pin sources of JasperSQLReportFormatter to a current topic.

Thanks.

I tried to migrate custom report https://github.com/andreysubbotin/csvreport/blob/master/modules/core/src/com/company/csvreport/core/CsvReport.java from v.6.4.2 to 6.5.3. The report works without errors.

Is the JasperSQLReportFormatter declared as a public class?

Here is the code in the attachment. I will check out your csvreport example. The way this operated before was that I declared:

  • PASFormatterFactory - extends CubaFormatterFactory, mapping the report code "JRXML" to...
  • JRXMLFormatter - extends AbstractFormatter, which tells the system what types it supports and calls Jasper
  • JasperReportFormatter - extends CustomReport - to execute a Jasper report using YARG Bands
  • JasperSQLReportFormatter - extends CustomReport - to execute a Jasper report containing embedded SQL

I did not need to make the JasperReportFormatter or JasperSQLReportFormatter public before. What changed?

Changing them to public classes did fix the problem. Thanks!

customreport.zip (5.9K)

Eric,

Could you add public modifier to JasperSQLReportFormatter class and try to run report

public class JasperSQLReportFormatter implements CustomReport

Thanks.