Report/Subreport calculations

marko

Registered User.
Local time
Today, 12:20
Joined
Dec 20, 2002
Messages
24
Hi!

I have report with a sub report in it. What would be the syntax to perform calculations on main report using data from sub report? For example: if I have a textbox TOTALSUB on sub report, and I would like to use that sub report total in a total for main report which is in a textbox TOTALMAIN. My sub report is called FIXTURES.

Another thing. Is it possible to have two details on report? So that in one detail I have data from my main report, and than in other detail I have data from my sub report? They need to be separate, I can't put them in single detail.

Thanks!
 
I was at the Microsoft Developer net site and found the attached document describing how to address fields and controls in forms & subforms. Problem is, I found in my report these rules did not work well. Seems like reports don't like the "me" reference.
I kept messing around, try just to display a value from a subreport into the main report, then worry about the math.

What worked for me:
On the main report I had a text box which calculates the remaining credit requirements for a student.
=Subreport Field - Sumation field on main report

exact syntax:
=nz([rsubCollegeCourseCohort].Form![PHI Req]-[PHI hours Grand Total Sum])

in psuedo english to access the field value on the subreport:
[subReport].Form![fieldOnSubReport]
 

Attachments

Oh boy! This is awesome!

Thank you!
 

Users who are viewing this thread

Back
Top Bottom