Jump to content
Changes to the Jaspersoft community edition download ×

Crosstab-Repeating Row Group data for each Measure


chetan_33

Recommended Posts

Hi All,

 

I have a cross tab wherein I want the data in the row group 1 to be repeated for all the rows which are generated for row group2 and so on.

 

To explain considering the sample ShipmentsReport.pdf located at "jasperreports-1.2.5demosamplescrosstabs" OR "jasperreports-1.2.5docssamples"

 

In this the first row headers are for region and second is for city. In sample region is shown once for all cities belonging to same region.

I want to repeat the value of region for all cities in the first column instead of just displaying it one time.

How to do this.

 

Also am looking for layout solution posted at

 

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&catid=8&id=311

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can use the header of the second row group to print both the first group label and the second group label (by simply using two text fields). If you want it to look like two separate cells, you can draw a vertical line inside the row header.

 

Another option would be to create a dummy row group with a constant expression and use its header to display the first group label.

 

HTH,

Lucian

Link to comment
Share on other sites

lucianc thanks again

that was really a simple trick

I didnt understand the second option you told. Can you please explain me.

 

Also I noticed that with my original cross tab the label headers doesn't come properly above the data of the row group .The width of the row col groups seems to change even if I dont have stretch Type or stretch overflow defined. Any help on that.

Link to comment
Share on other sites

If you have two row groups A and B, you can obtain an extra row header that repeats for each B entry in one of the following ways:

1. Create a new group X between A and B having the same bucket expression as B. The header for the Y group would repeat for each entry in the B group.

2. Create a new group Y after B having a constant bucket expression (e.g. a fixed String). Again, the header of the Y group will repeat for each entry in the B group.

 

 

I'm not able to understand what kind of an alignment problem you have. Can you be more specific? What are the label headers and the data of the row group? Whose width changes and where (HTML export, PDF export, etc)?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...