2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 By: Stephen Hughes - srhughes Creating pivot tables 2006-05-11 01:54 Hi, I would like to create a dynamic pivot table in iReport using a crosstab. I would like to pass parameters to the main report (using JasperServer) and then pass the parameters to the crosstab. I want to choose the fields to display in the left column, top row and then the rest of the table. So for example, I have a database showing sports sales in each quarter thoughout the year (by quarter). Sales can be in Tickets, Equipment or Training. What I want to do is have one report that can ask for the data to display (ie show a table with sport vs quarter with sales in the main table, or Equipment vs quarter with sales in the main table). This needs to be one report since I have many fields which I would like to compare. Is there any way to do this in iReport? I have set up a crosstab already and can pass parameters, but the crosstab fields seem to remain static even when I change the input parameter. Thanks Stephen By: Stephen Hughes - srhughes RE: Creating pivot tables 2006-05-16 03:57 I solved this problem by using Groovy ternary statements, with a conditional string comparison statement to test if the parameter entered was "ABC". If this was true, then the bucket expression was $F{ABC}. Else, it was $F{XYZ}. Any number of conditions can be nested, although it gets rather long and difficult to manage. A switch may be better (if iReport supports this!) Link to comment Share on other sites More sharing options...
kannantechno Posted February 5, 2009 Share Posted February 5, 2009 you shall try using Prompt in Jasper Server , either using multi select or drop-down using list of values Link to comment Share on other sites More sharing options...
nkamir Posted February 5, 2009 Share Posted February 5, 2009 Yes, the if statement or conditional statement can be used in expressions as following: Code: Post Edited by Nasir Amir at 02/05/09 13:26 Link to comment Share on other sites More sharing options...
newbee2010 Posted December 3, 2010 Share Posted December 3, 2010 Hi,I am new to Jasper Reports and iReports. Is there a way to create pivot table using these and use the data from this pivot table as base to generate a chart.Thanks for your help, 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