Issue Details (XML | Word | Printable)

Key: SPR-4659
Type: Task Task
Status: Open Open
Priority: Major Major
Assignee: Juergen Hoeller
Reporter: Michele Mauro
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Spring Framework

Add example on how to configure JasperReports Sub-Reports with properties

Created: 04/Apr/08 01:43 AM   Updated: 02/Jul/08 01:25 AM
Component/s: SpringWEB
Affects Version/s: 2.5.2
Fix Version/s: 3.0 RC1

Time Tracking:
Original Estimate: 0.12d
Original Estimate - 0.12d
Remaining Estimate: 0.12d
Remaining Estimate - 0.12d
Time Spent: Not Specified
Remaining Estimate - 0.12d

Environment: Documentation


 Description  « Hide
In the Spring Reference Documentation, section 14.7.4.1, is described how to configure subreports for the JasperReports view technology. However, most of the examples of the rest of the chapter refer to a ResourceBundle configuration, while the example in this section refer to a xml configuration. The correct configuration to use when choosing the ResourceBundle is not obvious, so it would be very helpful to add an example that shows how to prepare the same configuration in both methods.

In the specific case, the example would read something like:

simpleReport.subReportUrls=ProductsSubReport=/WEB-INF/reports/subReportChild.jrxml

Failure to understand this subtlety leads to incorrect configuration that leads to a confusing error message (perhaps worth of another small jira) on the lines of 'Report URL [/WEB-INF/reports/DataSourceReport.jrxml] must either in .jasper or .jrxml' thrown from AbstractJasperReportsView.java:529.

Just a small edit of the documentation would close this issue.

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Roberto H. added a comment - 28/Apr/08 08:59 AM
great idea, in this case the documentation really needs to be improved. It costs me hours of dealing with this, which ends up in creating the view manually within the controller... and add the subreport stuff by hand. Cuz I couldn't find any descripting how to set a property with properties.

I will try this solution later.
Thanks.

Roberto H. added a comment - 05/Jun/08 03:37 AM
i have now the problem i need to add serveral subreports and i have no idea how to add more values and which sign is dividing them....

bean.subReportUrls=subReport1=/WEB-INF/reports/report1.jasper_?_subReport2=/WEB-INF/reports/report2.jasper

I tried some...

and i browse through the source and tried to find by myself. BeanDefinitionsReader... etc. i could find it.. quite complex the classes and hierachy

some hint?