Subreport with no data interfering with calculated control

G

Guest

hi there,
I have a report which contains several subreports. If the report has no
data I have used an IIF statement to set the label to Null
(=IIf([Materialsinfo_subreport].[Report].[HasData],"Materials",Null))
I have a calculate total on the bottom the calculates all subtotals on the
subreports. It works alright, until one of my subreports has no data, then I
get an error message.
Thoughts?
Thanks
Todd
 
M

Marshall Barton

Access said:
I have a report which contains several subreports. If the report has no
data I have used an IIF statement to set the label to Null
(=IIf([Materialsinfo_subreport].[Report].[HasData],"Materials",Null))
I have a calculate total on the bottom the calculates all subtotals on the
subreports. It works alright, until one of my subreports has no data, then I
get an error message.


The main report text boxes that display a subreport total
need to use the same kind of expression that you used for
the "label".

=IIf([Materialsinfo_subreport].[Report].[HasData],[Materialsinfo_subreport].[Report].total,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