Issue Description
I have a request to create a Table report and merge rows that have repeated values within the first column.
Please find attached Excel sample that deminstrate the requirement
How to create such the report?
Resolution
Based on the nature of report datasource, it is possible to achieve the requirements either by using Crosstab component or by using 2 datasets and Table component.
Let's review the second option.
We will use 2 datasets - the main report dataset returns distinct values for the first column which should be grouped. The second dataset returns 'details' records for each value of the main dataset.
Attached is a sample report based on SugarCRM sample database that demonstrates the idea.
The main report dataset returns distinct list of values which are used to group data (countries in my example).
I added corresponding TextField element into Details band, specify alignment and text rotation (Left).
Also, the element 'Stretch Type' property set to 'Relative to Band Height' and 'Print Repeated Values' unchecked.
Into the same band I added Table component based on the second dataset (Dataset1) which returns records for each country via parameter.
As a result, I got required output, find attached printscreen.
Solution tested with TIBCO JasperReports® Server v.6.4.0
Ref. Case 01553661
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now