If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Subreports and Page Breaks
I have a report with several subreports. I wish to break the page before
each subreport, but sometimes Subreport_1 will be empty, so I do not want a page break. I have: Main report === (page break object from toolbar) Subreport_1 === (page break object from toolbar) Subreport_2 This works fine if all subreports have data, but sometimes Subreport 1 will be blank, and if that is the case, I am getting a blank page betweek Main Report and Subreport 2. Thank you in advance for your help. Access 2000 or Access 2002 |
#2
|
|||
|
|||
Subreports and Page Breaks
Karen_H wrote:
I have a report with several subreports. I wish to break the page before each subreport, but sometimes Subreport_1 will be empty, so I do not want a page break. I have: Main report === (page break object from toolbar) Subreport_1 === (page break object from toolbar) Subreport_2 This works fine if all subreports have data, but sometimes Subreport 1 will be blank, and if that is the case, I am getting a blank page betweek Main Report and Subreport 2. Use code in the Format event of the main report section that contains the subreports. The subreport's HasData property will tell you if the it's empty or not: Me.pgBreak1.Visible = Me.subreportcontrol1.Report.HasData Me.pgBreak2.Visible = Me.subreportcontrol2.Report.HasData . . . -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Subreports and Page Breaks
You are the greatest! Thank you for a very clear and concise answer!
"Marshall Barton" wrote in message ... Karen_H wrote: I have a report with several subreports. I wish to break the page before each subreport, but sometimes Subreport_1 will be empty, so I do not want a page break. I have: Main report === (page break object from toolbar) Subreport_1 === (page break object from toolbar) Subreport_2 This works fine if all subreports have data, but sometimes Subreport 1 will be blank, and if that is the case, I am getting a blank page betweek Main Report and Subreport 2. Use code in the Format event of the main report section that contains the subreports. The subreport's HasData property will tell you if the it's empty or not: Me.pgBreak1.Visible = Me.subreportcontrol1.Report.HasData Me.pgBreak2.Visible = Me.subreportcontrol2.Report.HasData . . . -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|