Jump to content
We've recently updated our Privacy Statement, available here ×

aditi

Members
  • Posts

    9
  • Joined

  • Last visited

aditi's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. aditi

    Charts

    Hi, I am having a problem with charts and band height. I have a report which consists of stacked bar chart, pie charts and cross tabs and each of the three should start in a new page. Stacked chart and cross tabs are being run against same query wheras the pie charts have their own querys defined in subDatasets. I have the stacked bar chart along with the title details in the title and crosstabs in the summary. The problem is with the pie charts. I cannot do it in the title or the summary as it has to start in its own page. The only place where i can do is place it in a dummy group if i need it start in new page. But if I place the pie chart in a group the pie chart is getting repeated to the number of records returned by the pie chart query. If the query has 8 rows then I get 8 similar pie charts because i placed it in group. I played with this for quite some time and dont know how to resolve this. Appreciate your response. Thanks!
  2. Lucian, Attached is the entire jrxml. Also attached is results.xls which has the results from the db query which are input to jasper. thanks Post Edited by ggetafix at 01/26/2010 17:24
  3. Hi, I am having an issue with stacked bar chart when i do grouping on the row option (and when data has to shown only when entire row and entire column have > 0 data). If I have back to back columns with same row option (this could happen since the report is showing data only for non zero row and column values) then the stacked bar chart is not showing correctly since we are grouping it on the rowoption. To make it more clear I have attached a pdf (pdf 1). If you look at the crosstab(2nd page) there is an entry for marijuana under Followup(third column). But when you look at the graph you see no column option called followup but marijuana was added into the count of the next column called "Other" where marijuana is counted twice. From the report side it makes sense as I am resetting by rowoption. <variable name="countAmount" class="java.lang.Integer" resetType="Group" resetGroup="rowOption" calculation="Sum"> <variableExpression><![CDATA[$F{measure}]]></variableExpression> </variable> <group name="rowOption"> <groupExpression><![CDATA[$F{rowHeader}]]></groupExpression> </group> <dataset incrementType="Group" incrementGroup="rowOption"/> I tried playing around by setting another group columnoption and using the incrementGroup in dataset to columnOption even then results are wrong (pdf 2) - double counted for other. <variable name="countAmount" class="java.lang.Integer" resetType="Group" resetGroup="rowOption" calculation="Sum"> <variableExpression><![CDATA[$F{measure}]]></variableExpression> </variable> <group name="rowOption"> <groupExpression><![CDATA[$F{rowHeader}]]></groupExpression> </group> <group name="columnOption"> <groupExpression><![CDATA[$F{columnHeader}]]></groupExpression> </group> <dataset incrementType="Group" incrementGroup="columnOption"/> Any way to resolve this. Thank You. Post Edited by ggetafix at 12/30/2009 16:26 Post Edited by ggetafix at 12/30/2009 16:27 Post Edited by ggetafix at 01/26/2010 17:24
  4. I was able to resolve this. Somehow I missed the AbstractChartCustomizer API. Below is what needs to be done for someone having the same problem. Create a custom class which extends JRAbstractChartCustomizer. Overide the customize method. Use the chart class to get XYPlot and then numberAxis. Call the method createIntegerTickUnits with numberAxis class. Once done we need to point to this class in the template If using ireport go to Chart properties - customizer class and point to this class.. There is an example similar to this in samples chartthemes folder. Post Edited by ggetafix at 12/11/2009 04:03
  5. I created a Stacked Bar Chart and noticed that the intervals are in decimals like 0, 2.5, 5, 7.5 etc 1. Ofcourse these intervals change with data but for the graph I am creating it just doesnt make sense to have intervals with decimals at any point. I just need to have whole numbers. Is there any attribute where I can define this? 2. Also do I have control on the intervals if I want to set it a fixed value. I went through the API and could not find much. Maybe I missed. Any help on the above two would be greatly appreciated. Thank You
  6. Piechart displays fine when I executed a JRXML using IREport. I can see the different sections of the PieChart along with the names of each pie and its value.The results displayed are correct. When I use the same jrxml in my java application the value of each pie in the piechart is not being displayed. The key (the name) of each pie is displayed fine and the chart itself is correct. I ran the sample Pie3dChart which comes with Jasper Report demos changing the query and thae variables and the result is same. The values are not being displayed here. I checked with JasperViewer passing the jasperPrint thinking that when I am exporting to HTML I am loosing the value(which i doubted) and its the same. The chart dispays fine. I can see the names of each pie but not the value. <variable name="CONTENT_AREA_TOTAL" class="java.lang.Integer" resetType="Group" resetGroup="CONTENT_AREA" calculation="Count"> <variableExpression><![CDATA[$F{CONTENT_AREA}]]></variableExpression> </variable> <pie3DChart> <chart evaluationTime="Report" hyperlinkTarget="Self"> <reportElement x="68" y="66" width="700" height="229" key="element-1"/> <box></box> </chart> <pieDataset> <dataset ></dataset> <keyExpression><![CDATA[$F{CONTENT_AREA}]]></keyExpression> <valueExpression><![CDATA[$V{CONTENT_AREA_TOTAL}]]></valueExpression> <labelExpression><![CDATA[$F{CONTENT_AREA}]]></labelExpression> <sectionHyperlink > </sectionHyperlink> </pieDataset> <pie3DPlot > <plot /> </pie3DPlot> </pie3DChart> I spent a lot of time thinking that i may have missed a jar file or a style somewhere but I seem to have all the jar files. Any help would be greatly appreciated! Thanks
×
×
  • Create New...