maureyeslopez Posted December 12, 2013 Share Posted December 12, 2013 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...TotalPrevious 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 - ExpenseI 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 More sharing options...
Java_Jasper Posted December 12, 2013 Share Posted December 12, 2013 Hello,Here is a link to get you started, a quick tutorial.http://www.tutorialspoint.com/jasper_reports/jasper_crosstabs.htmB. Link to comment Share on other sites More sharing options...
maureyeslopez Posted December 17, 2013 Author Share Posted December 17, 2013 I ended up using a normal table with rows displayed horizontally and not vertically as I was planning. Link to comment Share on other sites More sharing options...
Recommended Posts
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