Link to home
Start Free TrialLog in
Avatar of Chi Is Current
Chi Is CurrentFlag for United States of America

asked on

Do Not Print Blank Subreport

Attempting to suppress a blank subreport, contained in  group footer:

When group footer contains no records, linked subreport still prints!  #?@$?%!*&

Have tried:
-------------
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
       If rptHrsCat0_SR.Report.HasData = 0 Then
       rptHrsCat0_SR.Visible = False
       End If
End Sub
-------------

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
With Me!rptHrsCat0_SR.Report
        .Visible = (.RecordsetClone.RecordCount > 0)
    End With
End Sub

-------------
In the Subreport On No Data property:
-------------
Private Sub Report_NoData(Cancel As Integer)
Cancel = True

End Sub
-------------

When the subreport is opened alone, only records containing data print.

Have made certain the Group Footer property: Can Shrink = Yes
Have made certain ALL subreport properties: Can Shrink = Yes

Must be missing something here; would appreciate illumination.

Thank You, Jacob
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Chi Is Current

ASKER

Thank you for your reply, peter57r!!

Client is using the same field for different kinds of information!  #?@$?%!*&

In the interim decided to change strategies and write ODBC function to straighten out the data for the report.

Best Regards, Jacob