xsjasper1005 Posted May 29, 2010 Share Posted May 29, 2010 Hi community,I am new to jasper reporting and i have to develop a simple stacked bar chart report.it should look like the stacked bar chart in the attachment - the sample stacked bar chart report is too complex so i don't understand how this thing works.How should i group the data from the sql server to generate the diagram (i grouped it by the date - but what to do now)? The result should be 1 diagram in the report which shows the count and vendors for the whole month.regards,Franz. Link to comment Share on other sites More sharing options...
xsjasper1005 Posted May 31, 2010 Author Share Posted May 31, 2010 Hi,maybe somebody has the same problem, so i will post my solution:First create a group for the dates (group expression is $F{DATE}) - name "DATE"Now create a group for the vendors (group expression is $F{VENDOR}) within first group - name "VENDOR"Now create the stacked bar chart with Increment Type "Group" and use VENDOR as the increment group.For series expression use $F{VENDOR}For category expression use $F{DATE}For value expression use $F{COUNT}Place the stacked bar chart in the Summary band.That's it. But currently my problem is the error message i got if the sql query returns no rows.I get "Error filling print... Null 'dataset' argument."Has anybody a solution for this?EDIT: my workaround is to set the "printWhenExpression" to $V{DATE_COUNT} (the variable will be created by iReport automatically when you create the DATE group).I think that will work correctly but i search for a solution to display an empty diagram. regards,Franz Post Edited by xsjasper1005 at 05/31/2010 12:50Post Edited by xsjasper1005 at 05/31/2010 12:51 Link to comment Share on other sites More sharing options...
dfarouk Posted December 21, 2010 Share Posted December 21, 2010 HiPlease can you post the original query, because i'm not sure how to include the $F{COUNT} in the stacked-bar value expression. (I got 'Field not found' error).Appreciate your help.Post Edited by dfarouk at 12/21/2010 08:15 Link to comment Share on other sites More sharing options...
dfarouk Posted December 21, 2010 Share Posted December 21, 2010 Sorry i'm new to Jasper reports, and need to ask many questions;if i used $V{VENDOR_COUNT} in the value expression, is that correct?Thanks, 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