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

winfried

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by winfried

  1. Hello, thanks a lot for the demo. I will have a look at it. I already found out, that I have to define a parameter in the subreport and not a variable.
  2. Thanks a lot for those suggestions. I now tried to use a subreport, but I don't find the way, how I can pass the variable "average" from the main report to the subreport. I tried to add it to the "parameters" in the subreport properties. I added the variable "average" with "Add" to the list (as "$V{average}" (the function "Copy from Master" only added the parameter "$P{SUBREPORT_DIR}"), but how can I access this parameter in the subreport itself? How can I get this variable and use it in my calculations or add it to a text box? My variable list is empty and I don't know, how I can use my average now. Can someone give me some hints about this? I also didn't find a description in the ireport guide, which did help me further in this subject.
  3. Thanks for the suggestion. I was already thinking about this, but the problem is, that I don't know, where I could set the evaluation time for a variable. There is no such setting for variables available. Or do I miss something here?
  4. Hello all, I'm new to iReport and would like to achieve the following task but have problems, how to do it: I created a datasource, which fetches a time series from a database table. I receive a list of values, which I want to see in the report. This is easy, I created the fields in the details band and get the values displayed correctly. At the end of the table, I want to see the average value, which I created as a variable "average" of the java class "java.lang.Double", the calculation "Average", Reset type "Report", increment type "None", variable expression of the value field name from the database table. To display the average value, I created a text field, with text field expression "$V{average}" and evaluation time "Auto". The value is displayed correctly and there are no problems, yet. Additionally to the value field from the database table, I want to display in the details band the deviation of the current value to the average value. First, I tried to create an additional variable "deviation" with the following variable expression: "Math.abs($V{average}-$F{VALUE})". This should show me the deviation as an absolute value. But unfortunately, the used "average" value is the current average of the line, not the final average value, which I see in the text field, when the report is generated. So, I created a text field instead, with the same expression as the "deviation" variable ("Math.abs($V{average}-$F{VALUE})") and used the evaluation time "Auto". So, I see the correct deviation and also no problem yet. But now, I want to color the displayed value according to their deviation (like coloring the value green, when the deviation < 5 and red, when deviation > 5). So, I added a conditional style. But when I use the following condition expression "Math.abs($V{average}-$F{VALUE}) > 5", the "average" variable is evaluated for each row and the final value at the end of the table can't be used. Is there a way, to create a variable, which is evaluated at the end of the report, without displaying this as a text field in the report?
×
×
  • Create New...