Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport shown something else when there is no data 1

Status
Not open for further replies.

mtabt

Technical User
Apr 25, 2001
23
US
I have a report with about 6 subreports. In some cases, the some subreports do not have any data. In those situations, I would like to replace the subreports with a label showing "No Data". I would like the labels to be in the same space where the subreports are. Basically, instead of showing a blank space, I would like to show "No Data".

Any help would be appreciated. Thank you.
 
The second part of the problem is to have a label with the text in it that you want to display when the subReport is empty and place it over the subReport. Then :-

If subReport has no date THEN
subReport.Visible = false
label.visible = true
ELSE
subReport.Visible = true
label.visible = false
End If


The first part of the problem is to decide when the subRecord has no data.. ..
In the MainReport's ONFormat event you could open a recordset that looks at the data that the subform would see and if rst.EOF then .. .. as above
It might be a problem if there are a lot of subReports.

Anyone else got a better idea for this part of the challenge ?


G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top