I have a report that printed via a filter form to select the required days of the report to print. There are several subreports on the report.
I have two subreports that are the same except for assembly number. If the two assembly numbers are the same, then I only want to print the subreport once. If the assembly numbers are different, then I want to print both subreports. The subreports are based on a summation query that looks at the assmbly number and determinies min and max assembly number. This all works okay and the correct report with the subreport is printed. It works okay if there are two subreports on the same day, and I do not print multiple days of the report. The problem is that when I select multiple days of the report to print, it will not print the second subreport.
I have tried moving the code from Report_Activate to the detail section On_Format without success.
My code is as follows:
If Reports!DayReport!StatusReport4.Report!BHA1DaySuRpt.Report!MinofBhaNo = Reports!DayReport!StatusReport4.Report!BHA2DaySuRpt.Report!MaxofBhaNo then
Reports!DayReport!StatusReport4.Report!BHA2DaySuRpt.Visible = False.
Basically, I am trying to say is that if the two assembly numbers are the same, make the second subreport not visible, but if thay are not the same, then print both subreports.
Thanks for your help.
BusMgr
I have two subreports that are the same except for assembly number. If the two assembly numbers are the same, then I only want to print the subreport once. If the assembly numbers are different, then I want to print both subreports. The subreports are based on a summation query that looks at the assmbly number and determinies min and max assembly number. This all works okay and the correct report with the subreport is printed. It works okay if there are two subreports on the same day, and I do not print multiple days of the report. The problem is that when I select multiple days of the report to print, it will not print the second subreport.
I have tried moving the code from Report_Activate to the detail section On_Format without success.
My code is as follows:
If Reports!DayReport!StatusReport4.Report!BHA1DaySuRpt.Report!MinofBhaNo = Reports!DayReport!StatusReport4.Report!BHA2DaySuRpt.Report!MaxofBhaNo then
Reports!DayReport!StatusReport4.Report!BHA2DaySuRpt.Visible = False.
Basically, I am trying to say is that if the two assembly numbers are the same, make the second subreport not visible, but if thay are not the same, then print both subreports.
Thanks for your help.
BusMgr