Display "No details" if subreport has no records

  • Follow


I've got a report that has group headings which may or may not have detail 
information (in a subreport).  I've got the subreport Can Shrink set to True, 
but would like to display something like "No details" in a textbox where the 
subreport should be, if the there are no records in the sub.

Any recommendations on how to do this?

----
Dale

0
Reply Utf 12/2/2009 3:56:01 PM

Dale,

Try this...  Put a label, lblNoDetails, with a caption of "No Details" 
behind your subreport.  In the On_Format section place the below code 
changing the name to your subreport.

    If Me.YourSubReport.Report.HasData Then
        Me.lblNoDetails.Visible = True
    Else
        Me.lblNoDetails.Visible = False
    End If


-- 
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors 
II

http://www.regina-whipp.com/index_files/TipList.htm

"Dale Fye" <dale.fye@nospam.com> wrote in message 
news:3ABBC9EB-7AC3-40EC-8074-D4534AA3099C@microsoft.com...
> I've got a report that has group headings which may or may not have detail
> information (in a subreport).  I've got the subreport Can Shrink set to 
> True,
> but would like to display something like "No details" in a textbox where 
> the
> subreport should be, if the there are no records in the sub.
>
> Any recommendations on how to do this?
>
> ----
> Dale
> 


0
Reply Gina 12/2/2009 4:23:07 PM


1 Replies
771 Views

(page loaded in 0.036 seconds)

Similiar Articles:
















7/25/2012 5:30:59 PM


Reply: