Calculate between SubReport and Report

S

Stacey Crowhurst

Hi. My report "rptProjectedCostSummaryFinal" has a subreport in the
budCCPIDFooter section "rsubCauseCodeAllocation". I would like to take a
field in the subreport divided by a field in the main report to get a
percentage.

The sub report field is:
=(IIf(IsNull([CON]),0,[CON]))+(IIf(IsNull([CO]),0,[CO]))+(IIf(IsNull([PCO]),0,[PCO]))+(IIf(IsNull([PM]),0,[PM])+(IIf(IsNull([NONCON]),0,[NONCON])))

The main report field is:
=Sum(ProjectedCosts)

I am not sure how do go about this calculation. For background the
subreport sums up cause allocations (base scope, errors & omissions, job
conditions, etc.). I would like to include what percent of total projected
costs each cause allocation is. Please let me know if you need more
information. And thank you as always for your help!!

Stacey
 
D

Duane Hookom

You need to reference the control name from the subreport. Try something like:
=rsubCauseCodeAllocation.Report.txtCtlName/Sum(ProjectedCosts)
This may cause issues if the subreport might not return any records. If this
is the case, you can search this NG for HasData to find a solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top