bob_8 Posted October 30, 2014 Posted October 30, 2014 Hi guys...I am using the Stacked Bar Chart but an extra bar with the length and lable of 0 (zero), that is NOT in my data is added to every stacked bar graph - but it won't show if I do a regular bar chart.Has anyone seen this? If so, how did you get rid of it or is this a bug?I am using Jasper 5.5.0 CE.Thanks!Bob
bob_8 Posted October 31, 2014 Author Posted October 31, 2014 Thaks for the note Hozawa. Here are the steps:In Jasper Studio1. File->New, then select the blank letter template4. Add the query (it is tested in the DBMS first to make sure this is not a SQL issue)3. Enlage title, drap the chart item into the Title area, double click on Select 3D Stacked Bar4. Create two series - one for a "yes" value, the other for the "no" value in one of the columns in the data. I am using $F{a}.contentEquals ("yes") or "no", to separae the two series.5. specify a field for Value, and another for Category.6. Preview in Studio - no errors. Everything shows up as expected, except the extra column.7. Running the report programmatically also produces the same 0 column.8. There are no 0 values in the data.Thanks for any and all help or suggestions,Bob
hozawa Posted November 2, 2014 Posted November 2, 2014 Do you get the extra bar with the regular Stacked bar instead of 3D stacked bar because I can't reproduce.
bob_8 Posted November 3, 2014 Author Posted November 3, 2014 Hi Hozawa. Thanks for your note.Yes. I just confirmed that I get the zero column with the two-dimenssional stacked chart as well.What version of Jasper Server are you using?Thanks,Bob
bob_8 Posted November 3, 2014 Author Posted November 3, 2014 Hozawa, could you post the <categoryDataset> portion of your report please? I am pretty sure I've narrowed the problem to what happens in that section.Mine is:<categoryDataset><categorySeries><seriesExpression><![CDATA[$F{a}.contentEquals( "yes" )]]></seriesExpression><categoryExpression><![CDATA[$F{c}]]></categoryExpression><valueExpression><![CDATA[$F{b}]]></valueExpression></categorySeries><categorySeries><seriesExpression><![CDATA[$F{a}.contentEquals( "no" )]]></seriesExpression><categoryExpression><![CDATA[0]]></categoryExpression><valueExpression><![CDATA[0]]></valueExpression></categorySeries></categoryDataset> Note the CDATA[0] in the second seriesExpression (Studio generated this). It may not be possible to bin the numbers as I am trying. I might have to create multiple datasets, one for each series probably. Anyway... it would be good to see what yours looks like... Thanks! Bob
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