I have a few column of integers taken from a database. In a subreport, I want to have a summary table of sorts with things such as average.
I created a variable to calculate the average with the built in variable calculations, but this is calculating the average line by line.
This was easily fixed by setting the evaluation time to report. It now calculates the total average but is printing it out for each line and I just want it printed once.
I attempted to solve this by using a print when expression and this works to print the value once, but the subreport still generates blank pages for each line after the first print (the subreport is one row in size). So in a column with 15 integers, the average is calculated and printed, but there are 14 blank pages after it.
How can I have things such as sum, average, lowest, highest, standard deviation, etc. calculate and print one number?
Moving the value in the subreport to the summary band allows it to be shown once. But when this subreport is imported into the master report, it still repeats for each line in the detail band. I want the subreport in the detail band beside the data chart, see below.
Option 1: Rather than using a new colum to show average for all columns, show average at bottom of each column by using summary. In below table i am doing some in summary section.
Option 2: You can control your report layout via java code. I mean whatever object you passing to the report add two more variable. While you are iterating your collection from database populate these additional columns with your catlculated value for first 3 rows to show 3 different values.