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

Blanks in Reports 2

Status
Not open for further replies.

encom

IS-IT--Management
Jun 8, 2004
4
US
I have subreports set-up in a report. When that subreport is blank, it does not print anything. How do I make it print even if it is blank?
 
i am not sur to understand what you mean... it is pretty difficult to print "blank" since it is blank ! what would you want to be printed ?
 
Basically, each subreport has a border around it. Inside the border is the data. For some reason, if the subreport doesn't have any data in it, the report does not show up. I need it to show up, even if there is no data to show. What would be showing is the title of each data piece and the border. Right now, nothing shows. Hopefully that helps.
 
One way to accomplish this is to add labels to your main report that replicate the ones in your subreport, and place them under your subreport where you want them to appear. In the On Format event of the section where the subreport resides, put code like this to make those controls visible only when the subreport is empty:

Code:
If Me!SubReportName.Report.HasData Then
   Me.lblone.Visible = False
   Me.lbltwo.Visible = False
   etc....
Else
   Me.lblone.Visible = True
   Me.lbltwo.Visible = True
   etc....
End If


Hoc nomen meum verum non est.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top