Re: More summing problems

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Barry wrote:
I have a report in the form main report with 2 subreports. The subreports
are for customer and prospect calls. Often times there are no prospect calls
made on a particular day. In the footers of each subreport I have a control
that counts the number of records in each of the subreports. There are 2
controls on the main report to show the values of the counts adn reference
the fields in the subreport footers. So long as there are records in both
subreports the fields on the main report are filled in properly. When the
prospect subreport has no records I recieve #error in the field on the main
report. In the main report field I have tried;

IIf(subreport!CountField=0,0,SubReport!CountField) or
IIf(IsNull(SubReport!CountField),0,SubReport!CountField) and
nz(SubReport!CountField,0) and variations on a theme. Most work as long as
data exists in the subreport.


Check the subreport's HasData property.

=IIf(subreport.Report.HasData,subreport.Report!CountField,0)

--
Marsh
MVP [MS Access]
.



Relevant Pages

  • Re:Subreport Truncates some of the data
    ... Specially in the headers and ... footers. ... >document images in the subreport header and footer. ... I have checked the report width to ensure the ...
    (microsoft.public.access.reports)
  • Re: Page Headers not visible in Subreport
    ... Page headers and page footers are not visible in a report when it's used as ... I have constructed a unbound main report with 8 subreport controls. ...
    (microsoft.public.access.reports)
  • Re: Subreport loses page headings
    ... > I have a report which uses an on-demand subreport in Crystal 10. ... instant page headers and footers. ...
    (microsoft.public.vb.crystal)
  • Re: Multiple Pages in a Subreport
    ... some of the footers on your main report or the subreport. ... >DETAIL - Transaction Information SUBREPORT ...
    (microsoft.public.access.reports)
  • Re: report-subreport
    ... >> from the db window to the main report in design view. ... >> The subreport control that displays the report being used as ... >What should I do to get the footers of both reports too? ... Group footers and the report footer should display normally ...
    (microsoft.public.access.reports)