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

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?
 
G

Guest

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
 
M

Marshall Barton

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)
 

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