[#4992] - Conflict using Condition Styles and JRBeanCollectionDataSource for Tables

Category:
Bug report
Priority:
Normal
Status:
Assigned
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

I tried to create a report with IReport 3.7.6 that contains a page header, four Detail-areas and a page footer. I used JRBeanCollection as DataSource and build two tables in separated Detail-areas which get their data via datasource(new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{orderEntryJasperArray}))

So far everything works fine and I can show the report with the tables by preview.

The next step was to define a „default_style“ for the Report and add a Style Condition to the report.
The condition expression looks like ($F{documentStyleType}.matches( "style" ))

If I generate a preview after adding the Condition Style I get the following error message:
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. Field not found : documentStyleType

The field still exist and works fine if I show the value of the field „${documentStyleType}“ at the Report. Only in combination with the „condition style“ the value is not available.

After lots of testing I found out that the „Condition Style“ works and the field not found exception disappeared if I delete the two tables at the report.

The conclusion is that the report works fine without the tables or without the style condition, but I still need both function of iReport.

I attached the jrxml file.

Best regards

AttachmentSize
Binary Data OrderConfirmation.jrxml26.31 KB
proximus25's picture
Joined: Nov 29 2010 - 2:57am
Last seen: 11 years 6 months ago
Feedback