Skip to content
Advertisement

Jasper report blank page

My jrxml and java code below . I am trying to create report with some text and values . However blank report is generated . I am pasing map to fill the report as parameter . I have to add 4-5 static lines and then one dynamic variable . I have added these thing in detailed band .whats wrong

JavaScript

Java code :

JavaScript

Advertisement

Answer

You are confusing the report data with parameters. I don’t see that you have any report data, which is why you are getting an empty report. Further, you are filling a parameter named “Field” instead of the actual report data. So you either need to create a parameter called “Field” in your report, and then refer to it in the detail band, OR you need to pass the report data into your report something like

JavaScript

where dataSet is a collection, such as List<?>. Within the List, you would have an object where one of the properties is Field.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement