Expression in a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report with a sub report. The report contains a "Grand Total"
figure which comes from a subreport. In another field on the mail report I
have to take this figure, subtract 8000, and multiply it by 15%. I cannot
get the expression to work out. This is one of the expressions I've tried:
=Child320.Report!([Amount Grand Total Sum]-8000*.15)
Something is wrong, but I cannot figure it out. I keep getting error
messages.

I keep
 
Ronnie,

What are the error messages?

I would try like this...
=([Child320]![Amount Grand Total Sum]-8000)*.15

This assumes that 'Amount Grand Total Sum' is the name of the control on
the subreport. This will produce an error if there are no subreport
records.

If this doesn't work, the next thing I would try is to do it in 2 steps
- have a hidden control on the main report, to directly reference the
total off the subreport, so let's say you name this hidden control
SubreportTotal and then the visible control on the report will have this
Control Source...
=([SubreportTotal]-8000)*.15
 
Almost! This is giving me 15% of 8000 rather than the grand total - 8000.
--
Ronnie


Steve Schapel said:
Ronnie,

What are the error messages?

I would try like this...
=([Child320]![Amount Grand Total Sum]-8000)*.15

This assumes that 'Amount Grand Total Sum' is the name of the control on
the subreport. This will produce an error if there are no subreport
records.

If this doesn't work, the next thing I would try is to do it in 2 steps
- have a hidden control on the main report, to directly reference the
total off the subreport, so let's say you name this hidden control
SubreportTotal and then the visible control on the report will have this
Control Source...
=([SubreportTotal]-8000)*.15

--
Steve Schapel, Microsoft Access MVP

I have a report with a sub report. The report contains a "Grand Total"
figure which comes from a subreport. In another field on the mail report I
have to take this figure, subtract 8000, and multiply it by 15%. I cannot
get the expression to work out. This is one of the expressions I've tried:
=Child320.Report!([Amount Grand Total Sum]-8000*.15)
Something is wrong, but I cannot figure it out. I keep getting error
messages.

I keep
 
Back
Top