Jump to content
JasperReports Library 7.0 is now available ×

Crosstab conditional rows (PrintWhenExpression)


Epicurus

Recommended Posts

I'm trying to create a crosstab report that has a few extra rows at the top of the cross tab section. The extra rows are not grouping rows or columns. They are just extra data that needs to be displayed. See the following image:

 

 

The Model, Type, Size, View and Features rows are the extra info to be displayed.

 

I'm trying to generate this report using a cross tab. I thought I could displlay the extra fields by embedding them in the crosstab cell value and using some PrintWhenExpression values combined with setting the "PositionType" to "Float" for all but the first item. For example my report has the following:

Model (print when ROW_COUNT == 1, position=top)

Type (print when ROW_COUNT == 1, position=float)

...

Features (same as Model)

Price (print always, position=float)

 

The "Price" rows are the real data in the cross tab. The rows above that are the extra data that needs to be part of the cross tab information.

 

It is my understanding that the postion=float should 'push' the elements towards the top of the cell. That's how it seems to work in normal reports (non-crosstab).

 

Is there some way to get a crosstab report to work similar to the attached image sample?

 

I looked at the samples that come with JasperReports, but none of them come close to this kind of complexity.

 

Thanks for your help.

 

Alex.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...