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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub Report with No Data 1

Status
Not open for further replies.

Qwert0000

Technical User
Oct 24, 2003
30
0
0
This has been covered in other threads but I am unable to fix my problem. I have an unbound main report with several sub reports. I am trying to ensure the sub reports will print on the main report with no data in them. Looking for a consistent look on my report. I tried using iif(Nodata... in the report and it works fine when I open the report by itself but the report doesnt fire as a sub report.

Any suggestions?

Thank you Eric.
 
Subreports will not print on the main report if the subreport has no data.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Is there an easy way I can count the number of subreports with data in them so I can number my sub reports?

For example report Looks like this.

HEader.

1. Subreport Header

data data data

2. Subreport Header
data data data

3. Subreport Header
data data data



If sub 2 has no data my report numbering makes no sense.

Thanks for your help.
 
You can find out if a subreport has data by using the expression:
=IIf(subrport1.Report.HasData,1,0)
You might be able to add these together so for the 3rd sub, the number would be:
=Abs(subreport1.Report.HasData) + Abs(subreport2.Report.HasData) + Abs(subreport3.Report.HasData)

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
That did the trick. Threw a couple of invisible text boxes on the main to do the counts and referenced the text boxes in the subs.

Thank you so much.


Eric
 
one more quick question.

I had to remane my subs I had the names starting with numbers and that seemed to give me problems so i changed the names.

My subs have been hidden as i can edit them through the main report. How can I unhide the subs so I can delete the old ones. Ive done it before but cant remember how.
 
In the database window, select Tools|Options|View and check Hidden Objects.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thanks again.

This site has been an invaluable learning tool for me.

I'd toss you a star but I'm not sure how.

Eric.
 
Hi Qwert0000.

Below each reply, there's a link called "Mark this post as helpful/expert post".

Click it, you get a popup where you confirm.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top