We are using 5.0.1, and have converted many of our Crystal Reports projects over to iReport/Jasperserver and are happy with the results so far.
I am converting a summary report now that has variable fields in the detail section, multiplying a combination of integer fields and float fields from the database. I am suppressing the detail section using the Print When Expression, and have created 3 variables to sum the total of the 3 associated variables in the detail section.
The business rule is to round the result in the summary, so, in the Variable Expression of the 3 summing variables in the group footer, I am wrapping Math.round() around the variable name from the detail section in all 3 of the summary variable properties. Two of them work flawlessly, one does not. We have double and triple checked to make sure that the summary variables have exactly the same properties, even copying from the working one(s) to the non-working and then renaming. We have checked the Variable Class to make sure it is Float datatype, and we have checked the data to make sure there are no NULL, empty string, or character data where there should not be. I have also run the report using the Empty Datasource, and it compiles and runs, but obviously with no results.
If I remove the Math.round() wrapper, the report will compile and run with the other two summary variables rounding fine, but as soon as I add the wrapper function to the 3rd variable, the report throws an error: Error evaluating expression...then flags Math.round(LCIncr_Total), which is the offending variable name. I will attach the .jrxml and .jasper files to this request.
Any assistance is appreciated greatly...
The order in which your Variables are defined matters. Since the LCIncr_Total actually uses LC_Increase, LC_Increase needs to appear before LCIncr_Total. In the report inspector panel, you should be able to just grab the LC_Increase variable and move it up higher in the list (before LCIncr_Total, but after LCUpPrice since LCUpPrice is used to define LC_Increase).
Try that and see if it solves things for you.