I have a report that has a subreport in the details section of the main report. If the value of a certain field in the detail section of the main report is "0" then I want the subreport so shrink to 0" vertically in the detail section of the main report.
I have everything set to can shrink = yes in the detail section of the main report and also in the detail section of the subreport. (The only section of the subreport with anything in it is the detail section).
Here's my onprint code for the detail section of the main report which isn't doing anything... (I also tried this in the onformat event)
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.txtSumOfScrap.Value = 0 Then
Me.rptInternalScrapReportDefectCauses.Visible = False
Me.rptInternalScrapReportDefectCauses.Visible = True