Query with no results

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I have a report that has multiple sub-reports, each with
there own Query (data source). How do I get a sub-report
to appear on the main report showing no data (or zeros).
I have tried using the Nz function and have not had
success. Please help!!
 
Don said:
I have a report that has multiple sub-reports, each with
there own Query (data source). How do I get a sub-report
to appear on the main report showing no data (or zeros).
I have tried using the Nz function and have not had
success. Please help!!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Generally, you can't. Queries only return results on data that exists
in the db.

In reports I used to put a Label under the sub-report control. During
the report run I'd have a test in the OnPrint event procedure of the
section where the sub-report was placed. In that procedure there
would be a check of the HasData property of the sub-report. E.g.:

Me!SubReportControl.Visible = Me!SubReportControl.Report.HasData

When there wasn't any data in the sub-report the Label under the sub
report would display. The Label's Caption would be something like
"There wasn't any data for <sub-report's function>"

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQFiuIIechKqOuFEgEQK30ACg7CM3M3uCP7vXZjDQ36LwRBSBub8An2v6
4nBon5+AOvpc4M+iZZuLJrAk
=37Tt
-----END PGP SIGNATURE-----
 
Back
Top