Jaspersoft generated report error on >600 pages only - jasper-reports

Using jaspersoft server api V6.5.1
Problem: Compiling a Report-(PDF) with >600 data items fails with below error.
Selecting <600 = no error. This tells me the report design is valid. Can anyone help me debug this?
----1. error message (again, only when selecting 600+ records)
Exception: net.sf.dynamicreports.report.exception.DRException: net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. The title section, the page and column headers and footers and the margins do not fit the page height.
stack: [net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperReport(JasperReportBuilder.java:293), net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperPrint(JasperReportBuilder.java:324), net.sf.dynamicreports.jasper.builder.JasperReportBuilder.export(JasperReportBuilder.java:599), net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toPdf(JasperReportBuilder.java:536), dynamicreports.Rep3.exportReportFile(Rep3.java:5356), dynamicreports.Rep3.makeReport(Rep3.java:4988), dynamicreports.Rep3.main(Rep3.java:5974)]
----2. how report looks as final PDF (1 page each record)
----3. report design
----4. code of template: https://community.jaspersoft.com/questions/1192881/report-error-600-pages
Note: Since the complete version of this answer exceeds Stack Overflow's length limit, you'll need to head here: https://community.jaspersoft.com/questions/1192881/report-error-600-pages to read the extended version, with more tips and details.

Related

Invalid trailer in pdf java itext 5.4.3

My requirement is to add the time stamp in the bottom of the PDF. I'm using itext 5.4.3 version to edit the PDF and able to add the time-stamp successfully. But the process is throwing java.lang.ArrayIndexOutOfBoundsException exception for some PDF.. Attaching the exception stack trace below.
at com.itextpdf.text.pdf.PdfEncryption.createInfoId(PdfEncryption.java:558)
at com.itextpdf.text.pdf.PdfStamperImp.close(PdfStamperImp.java:383)
at com.itextpdf.text.pdf.PdfStamperImp.close(PdfStamperImp.java:337)
at com.itextpdf.text.pdf.PdfStamper.close(PdfStamper.java:206)
I did the analysis and found this issue is happening due to bad trailer exist in pdf,itext is expecting 16 bit trailer data whereas my pdf is having only 4 bit or some times 10 bit. Attaching the trailer information below.
Valid Trailer:
/ID AA8280F47FC1BF4DCD5C88E6A493092D
Invalid Trailer:
/ID B2DE387A
We have asked vendor to re-scan the PDF again but looks like most of the PDF is having the similar trailer. Is there anyway to edit the PDF using itext which is having invalid trailer? Please help.
Any updated version will fix the issue?
This is reproducible with 5.4.3, but not with the current version, 5.5.7.
This is probably the commit that fixed it: e28f688033
(This fix seems to be a bit overkill, because it's creating new IDs whenever the existing one aren't 16 bytes, which isn't a requirement.)

JSON schema validation failed: resource: String does not match pattern:^/[^/~!#\$%^|\s`#&*()\-+={}\[\]:;"'<>,?/\|\\]+(/[^/~!#\

I'm trying to embed Jasper Reports into APEX App. I'm able to gather reports from samples (samples on JasperCommunity website), however, when I'm trying to get created by me and colleagues reports - every time I have the same error:
JSON schema validation failed: resource: String does not match pattern: ^/[^/~!#\$%^|\s#&*()\-+={}\[\]:;"'<>,?/\|\\]+(/[^/~!#\$%^|\s#&()-+={}[]:;"'<>,?/\|\]+)$.
In other words I can't get any of our reports apart from the samples (e.g. /public/Samples/Reports/03._Store_Segment_Performance_Report"). I think the case is that the path to the Report is wrong, but I've tried all possible and impossible options and none of them works. Anyone any ideas please ?! Thanks
P.S. APEX 4.2.6, JasperServer 6.0. And finally, I can get samples Reports ONLY under the JasperAdmin user, simple User always got an error - 'Access Denied'. Why ?!?!?!
Sorted.
If anyone interested - when specify the actual path, in Jasper: right click on Report(or Dashboard, AdHocView etc.) and copy the path from it. As it differs from when you point mouse on it (e.g. adding the underscores etc.), and paste this actual path into your javascript code into HTML section in your web app. Thanks

BIRT report with parameters: Can not load the report query

I'm trying to run a report on Birt web viewer (JBoss) with a parameter and I get the following error:
- Grid (id = 1461):
+ Can not load the report query: 1461. Errors occurred when generating the report document for the report element with ID 1,461. (Element ID:1461)
Reports without parameters are working fine. Reports with parameters are running fine in Eclipse Report Designer.
Could someone give me advice please?
I had same kind a problem (ie. the report was throwing error while tried to fetch from the tomcat web container). To resolve this issue, I have added the database driver in the /WEB-INF/lib folder.
Please try this once and let me know if it works.
I solved my problem opening my report with "preview" instead of "frameset". This shows the real exception.
Might be you have not define id in your report parameter,either in report parameter or data set parameter.
In my case, the datasource for BIRT was not configured correctly. I needed to make sure the JNDI name matched what was in the config for my container.

Generate a report using jasperReport contain no available data

I'am using JasperReport and ireport 4.0
I want to generate a report contain the word "no available data for this request" When the request do not return data.
How can I do that?
than you
Rym, you can set "When No Data" template property to "No Data Section" value (in IReport). And then add Static Text (to this new band) with "no available data for this request" text, for example
You can do as Alex K said, or better check if you have any data to process before generating the report, then you can generate another simple report saying "no available data ...", I guess you can save much on computing resources doing it this way.

How to troubleshoot "DataMember Not Found" in ActiveReports

ActiveReports seems like a powerful flexible tool, but if you make a mistake anywhere, you get an exception "data member not found. please check your datasource and datamember properties".
There is no indication as to which datasource/datamember is at fault or what subreport the problem lies in, but Active Reports must know this!
The stack trace is no use, as the error is thrown after the report.run() method is invoked from deep within code generated by Active Reports itself.
Does anybody have a solution other than commenting out one subreport after another and checking all fields in turn?
I was getting the same error while trying to pass a raw dataset to a report as below:
...
Dim rpt as New ActiveReport
With rpt
.DataSource = _data
.Run()
End With
...
I specified a table in the dataset and the error went away.
...
.DataSource = _data.Tables(0)
...
`
Unfortunately I don't know a way to immediately tell which subreport that error is coming from. Indeed, that error message should be improved when you're using subreports. I will report it to the ActiveReports development team.