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

partizan1

Members
  • Posts

    8
  • Joined

  • Last visited

partizan1'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. Hi, We're trying to generate a pdf report with a chart that outlines different severities - High, Midium, Low and None. Please see the attached jrxml file. Thanks for looking into it, Lucian. partizan1 Post Edited by partizan1 at 07/06/2010 21:25 Post Edited by partizan1 at 07/07/2010 20:36
  2. Hello, I'm having difficulty understanding why the slices of my pie chart don't work as described by the "Jaspersoft Ultimate Guide for iReport". I read the tutorials and still doesn't work as I thought it would. I'm trying to make it so that a click on a pie slice will take the reader down to the details of my report that correspond to that slice. Such as I have slices for different colors - green, red, yellow. My data is organized based on each of those colors. I have my pie chart details set as follow: 1. Pie Chart "Section hyperlink" tab. a) Hyperlink target = "Self" b) Hyperlink type = "LocalAnchor" c) Hyperlink Anchor Expression = "$F{COLOR}" 2. Down in my report Color_Group_COUNT (Group band), I have organized the data per each color. For my "$F{COLOR}" variable which is added on the Color_Group_COUNT (Group band), I have specified under the Hyperlink property: a) Anchor Name Expression = "$F{COLOR}" (so that the pie chart slice knows what section in the report it should go to). After I load my report, the pie slices are not even clickable. Nothing happens when I click on them, and they don't take me down in my report group section for the color slice clicked on. How can I make the clicks on the slices of my pie chart to go down to the color section that correspond to the pie slice that user has clicked on? Please help, partizan1
  3. I found out how to get the percentage. This forum helped me: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=49687 Please refer to this quote by Teodor: "In JasperReports version 3.1.0, we have introduced two new properties to control the appearenace of section labels and legend labels. These two are called labelFormat and legendLabelFormat. You can use {0}, {1} and {2} for displaying the key, the value and the percentage in pie charts. For these formats to be used, you have to leave the labelExpression empty. I hope this helps." by Teodor I hope that helps to the rest of you having this problem. Cheers, partizan
  4. Hi, Has anyone else encountered the problem of not being able to use the Sum function on a Variable? I need to calculate the total number of a column value (i.e. AFFECTED_ROWS column in my table). I have the variable 'totalNumbAffected' which has the Properties set to: Variable Class: Double Calculation: Sum Reset type: Report Increment type: None Variable Expression: $F{AFFECTED_ROWS} If I print the variable on my report, it does display the correct sum. However, if I try using it in my Pie Chart, for each pie slice the value is different and therefore it's incorrect (except for the last pie slice). My question is - How can I calculate the Sum of my column before it's used in my pie chart so that the value is the same for all pie slices? Can someone help please? Thanks, partizan
  5. You know Giulio...this is what I've been missing the whole time! The documentation I read on was saying that I should always put my chart in the Summary band, so I did. And I was trying to use subreports to get the chart displaying where I wanted. Well, now it works the way I needed to. Thank you so much Giulio! Also thanks to Svenn, because your solution works great with Giulio's recommendation, and both gave me what I needed! Thanks guys! I really appreciate it! Partizan
  6. Hi again, I think I found a close solution. Can you please tell me if that's the way to go. I had to use in the 'Data Source Expression' of my subreport element in the parent report the value '(my.data.source.CustomJasperDataSource) $P{REPORT_DATA_SOURCE}'. It may work just fine without the casting. I'm generating a summary chart so I'll be using its data only once (iReport guide suggests that REPORT_DATA_SOURCE should never be used more than once in a subreport). I tried your solution above, but it didn't work together with my way of feeding the subreport. That is, the chart is displayed on the top of the report, however only one row is printed in the parent Detail band, and not all. Do you know how I can display all of the rows in the parent Detail band? Thanks, Partizan Post Edited by partizan1 at 06/03/2010 17:31
  7. Thanks Svenn for your advice. I'll definitely try it. Until I can actuall try your suggestion I need to successfully start feeding my subreport with data from the parent. I find it very challenging in my case, because our application is using a custom JRDataSource. I have specified in my parent report, for the subreport element, that the 'Data Source Expression' should use 'new my.data.source.CustomJasperDataSource()'. I know that I can't use an empty constuctor since I need to feed the subreport with data. However, I can't simply pass a field or a parameter in because my CustomJasperDataSource() takes in our own data structure (datagroup). My question is how can I pass from the parent report to the subreport our custom data structure so that the subreport can make use of? Is it possible to have a parameter to represent my custom 'datagroup', so that I can pass in that parameter in the CustomJasperDataSource()? That is, I need to do something like this for 'Data Source Expression' value 'new my.data.source.CustomJasperDataSource(datagroup)' where the datagroup is not currently represented in the parent report by anything. Our application is using xml files that define the datagroup and the CustomJasperDataSource() is making use of it programmatically. I'm very confused as to how I can pass a custom data stucture i.e. datagroup from the parent report down to the subreport so that the subreport can use the data from it to print the report. Please I need your help. Thanks, partizan
  8. Hi, Does anyone know if it's possible to have a summary pie chart as the first page of a report (right before the Detail band)? I'm trying to use a subreport to do that, but my pie chart doesn't show. You advice is appreciated! - Partizan Post Edited by partizan1 at 06/02/2010 15:36 Post Edited by partizan1 at 06/02/2010 15:36
×
×
  • Create New...