A14 Recompute - University of Northern Colorado

advertisement
Recompute
Developer Studio
University of Northern Colorado
Sometimes it is necessary to generate a percent based on the subtotal. In order to do this you must use a
recompute and a computed value.
Example: PUG Report Writers\Standard Reports\Sappington_Lee\RECOMPUTE example
You have been asked to generate a report that shows the amount of aid awarded by Level and Source. You’ve
been asked to split the amount paid between the different types of aid (Loan, Scholarship, Grant and Work)
and student level.
You generate a summary report and then use the summary report to produce percentages.
Notice these 3
variables use
computes to get
values.
Notice Scholarship and work have
no compute they are defines
Notice a compute has been used to generate average aid, grant percent and loan percent. Work and
Scholarship percent were calculated in a define. The subtotal has been changed to a recompute.
Here are the defines used in the report.
DS Adv Features A14
Page 1
Output looks like this when recompute is used:
Notice the percents for Grant and Loan are computed based on the values in the subtotal row. The average
Aid is calculated based on the totals within Undergraduate and Graduate appropriately. However, notice the
percents for Scholarships and Work. The percents are on the subtotal lines are simply totals of the percents
above and are not calcuated using the totals. Remember, I used a define to get Scholarship and work
percents. Because I did not use a compute for scholarship and work percents the recompute does not work.
DS Adv Features A14
Page 2
When Subtotal is used the output looks like this:
Notice, even though I’ve used a compute for Average Aid, Grant Percent and Loan Percent the values on the
subtotal lines are totals of the values above them. Also, Scholarship percent still behave the same as before
and the subtotal lines are sums of the values within the column.
When trying to calculate a percent or an average and you have by values with subtotals in your report you
must use a compute for the value and then use recompute instead of subtotal.
If you include a total in your report and you have set up your computes and recompute correctly, the
recompute follows the total as well. In our example, if recompute is not turned on, the average aid in the total
would be 26,909.64 which is the sum of the undergraduate and graduate totals. On the other hand, when
recompute is turned on, the average aid for the total is 3,328.42 which is Total Aid divided by Total number
with Aid.
DS Adv Features A14
Page 3
Download