Table or Crosstab report design

0

I'm starting with Jasper Reports and I have a use case that I'm finding difficult to solve. The report I want to design should be like this:

  Account 1 Account 2 ... Total
Previous Balance        
Income        
Expense        
Balance        

Where Column Headers are dynamic depending on the number of Accounts defined and the three Row Headers (Previous Balance, Income, Expense) will always show in the report even if some Account has a nullor 0value in any of them. The Balance at the end would be the result of Previous Balance + Income - Expense

I first watched how Crosstab works as the report is a matrix where I can get the Total in any of the two ways (through sum of Balances or applying the Balance formula to the Total column), but what I'm not understanding is how could I make the Rows headers fixed. Should I use some variable that I set by hand? Any hint on what to read will be a great help.

The other approach I suppose it would be feasible is using a table where the row headers of the diagram would be the columns and Accounts the rows. Balance is easily defined same as total. The only thing I don't know if it's possible is turning the columns to rows and viceversa (transposing the table). What do you think, is this approach better? If so, is it possible to transpose the table? what's the JRXML attribute to do so?

 

maureyeslopez's picture
Joined: Dec 9 2013 - 12:19pm
Last seen: 1 year 2 hours ago

2 Answers:

1

Hello,

Here is a link to get you started, a quick tutorial.

http://www.tutorialspoint.com/jasper_reports/jasper_crosstabs.htm

B.

Java_Jasper's picture
Joined: Jan 17 2012 - 10:13am
Last seen: 2 days 41 min ago
0

I ended up using a normal table with rows displayed horizontally and not vertically as I was planning.

maureyeslopez's picture
Joined: Dec 9 2013 - 12:19pm
Last seen: 1 year 2 hours ago
Feedback
randomness