Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating data between primary & sub-report?

Status
Not open for further replies.

lmorgan

Technical User
Jul 31, 2001
19
0
0
US
Not having used sub-reports before, I'm wondering if it is possible to take the results of a primary report and calculating a percentage against the results of the sub-report?

My sub-report returns a grand total of a count of loans, and my primary report returns a portion of these loans that are "aged". I would like to be able to calculate what percentage of our portfolio is aged.

Any suggestions on how to write the calculation or is it possible?

Thank you so much for any assistance you can give
Lisa
 
Sharing a litte more information to help identify the problem.

I'm using CR8.0, and I just created a shared variable in my sub-report that gives me the grand total of the number of loans represented.

Code:
 shared numbervar GrdTotal := count ({fcs_master.acct_number})

I then created a formula in the primary report that divides the total number of aged by the Grand Total of the sub-report.

Code:
 shared numbervar GrdTotal
GrdTotal / Count ({fcs_master.acct_number})

I placed this forumula in the report and when I run the report, I'm getting a return of 0.00. I thought to reverse the above formula but then I get a "division by zero" message.

Any thoughts?
Thank you!
Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top