Totals across subreports that may not have data

  • Thread starter Thread starter rhizopus
  • Start date Start date
R

rhizopus

Guest
I have one report that contains several subreports. In the reports footer I am attempting to make calculations from the results of several of the subreports. The subreports may not always yield data. This produces an "#Error" in the report footer calculations.

How can I handle these errors and perform these calculations when the subreports do no have any data. The calculations are simple additons. Example:

[Total Cash Sales] = ([Gear Subreport].Report![Gear Cash Sales]+[Food Subreport].Report![Food Cash Sales])
 
Subreports without date

All your fields ahave to have data to add them. Here is a way around it.

exp1: IIf([Food Cash Sales ] is null,0,[Food Cash Sales])

This will fill the empty fileds with zeros if there is not amount.

Maria
 
You have to use the HasData method, there have been many examples posted here
 
IIF Example did not work

IIf(expresion Is Null, True, False) did not work. I believe in this example the data is not "null" bur rather "HasData" false. The following does not work either: IIF(expresion HasData, True, False). Any suggestions on syntax for using "HasData"
 
It should read something like
=IIf([MoniesRecd].[Report].[HasData],[txtBal]-[MoniesRecd].[Report]![txtSubTot],[txtBal])
where txtBal is the original invoice amount and MoniesRecd displays any payments received for the invoice
 

Users who are viewing this thread

Back
Top Bottom