Sue Taylor
asked on
Calculated field based on a subreport field divieded by main report field
I have a Non-Conformance report that has a couple of subreports. One of the subreports displays a sum of invoices by vendor id. My main report displays the Sum of the Total NC Cost. I want to calculate the Impact $ which would be (Sum of @ Total NC Cost / Subreport: Sum of Command.ext_recvd)
How do I do this?
I was reading something about variables, but I have never used them so I don't know how to use them.
Vendor-Issues---Summary.rpt
Vendor-Spend-Subreport.rpt
Vendor-Name-Subreport.rpt
How do I do this?
I was reading something about variables, but I have never used them so I don't know how to use them.
Vendor-Issues---Summary.rpt
Vendor-Spend-Subreport.rpt
Vendor-Name-Subreport.rpt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My main report is a summary, Will that work?
So my final formula on the main report is:
WhilePrintingRecords;
Shared NumberVar SubreportTotal;
Sum ({@Total NC Cost}, {@Vendor}) / SubreportTotal
I don't get any errors when I test the formula however when I try to run it I get "Division by zero" error and it highlights
Sum ({@Total NC Cost}, {@Vendor}) / SubreportTotal
So my final formula on the main report is:
WhilePrintingRecords;
Shared NumberVar SubreportTotal;
Sum ({@Total NC Cost}, {@Vendor}) / SubreportTotal
I don't get any errors when I test the formula however when I try to run it I get "Division by zero" error and it highlights
Sum ({@Total NC Cost}, {@Vendor}) / SubreportTotal
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I created the second formula in the sub report and named it calcsubreport
I'm trying to create the third one and get a bunch of errors.
Should it really be? Because I get errors when I enter it exactly as you wrote it down. When I try to enter my report name in there, I get errors too.
WhilePrintingRecords;
Shared Number{mVar SubreportTotal;
{MainReportTotal / SubreportTotal