Jump to content
Changes to the Jaspersoft community edition download ×

Recommended Posts

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 1Account 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?

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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