How to change value of calculated control before printing if a ce.

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

Guest

A report has 3 subreports, each one showing a sum total of amounts in
different tables. 1 of the 3 examines a table that often has no data. I
have an Event Procedure that cancels format of that subreport if there is no
data. But the report footer of the main report contains a Grand Total of the
totals in the 3 subreports. I have used SysCmd in the footer to tell if the
one subreport exists or not. But I cannot change the calculated value of the
Grand Total accordingly. Can you make a suggestion?
 
I have been using the verification IsError:

GrandTotalReport:
=Sum(Value1) + iif(IsError(Child1.Report!GrandTotal), 0,
Child1.Report!GrandTotal)

I know it is not the most indicated, but it is working for me

Mauricio Silva
 
VinceP said:
A report has 3 subreports, each one showing a sum total of amounts in
different tables. 1 of the 3 examines a table that often has no data. I
have an Event Procedure that cancels format of that subreport if there is no
data. But the report footer of the main report contains a Grand Total of the
totals in the 3 subreports. I have used SysCmd in the footer to tell if the
one subreport exists or not. But I cannot change the calculated value of the
Grand Total accordingly. Can you make a suggestion?


Presumably, your grand total uses an expression like:

=srp1.Report.totala + srp2.Report.totalb +
srp3.Report.totalc

If so, then you candeal with the empty subreport this way:

=srp1.Report.totala + srp2.Report.totalb +
IIf(srp3.Report.HasData, srp3.Report.totalc, 0)
 
Back
Top