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
|
|||
|
|||
Report works but then fails when used as a Sub-Reportsource
Hi, sorry if this sounds too easy or stupid, I've been trying for a couple of days now to get this to work and I've read a lot on here so hopefully didn't miss anything.
I have a report that basically draws fields out of a table and displays them, nothing fancy. I need it to print 8 and then page break, again no problem as a report - it works. Now the main report has 5 of these sub reports and I figured I would work with it one at a time to get it right and eliminate re-doing a lot of work. When I use the report as the sub report source there are no page breaks and the report is only one page - shows 23 of the 26 records. If I link the master/child items I get one record only and still one page. I have the page break in the sub report detail and the code is as follows (found in the OnFormat portion): If Me![txtCount] Mod 8 = 0 Then Me![PGBK].Visible = True _ Else Me![PGBK].Visible = False I'm at a loss. I would have thought a working report could be used as a sub report with no tweaking. I thought worst case I would need to move the page break to the main report but still check on the number of records placed in the sub report. Any ideas? EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com |
#2
|
|||
|
|||
Report works but then fails when used as a Sub-Report source
Brian Ronan wrote:
Hi, sorry if this sounds too easy or stupid, I've been trying for a couple of days now to get this to work and I've read a lot on here so hopefully didn't miss anything. I have a report that basically draws fields out of a table and displays them, nothing fancy. I need it to print 8 and then page break, again no problem as a report - it works. Now the main report has 5 of these sub reports and I figured I would work with it one at a time to get it right and eliminate re-doing a lot of work. When I use the report as the sub report source there are no page breaks and the report is only one page - shows 23 of the 26 records. If I link the master/child items I get one record only and still one page. I have the page break in the sub report detail and the code is as follows (found in the OnFormat portion): If Me![txtCount] Mod 8 = 0 Then Me![PGBK].Visible = True _ Else Me![PGBK].Visible = False I'm at a loss. I would have thought a working report could be used as a sub report with no tweaking. I thought worst case I would need to move the page break to the main report but still check on the number of records placed in the sub report. Any ideas? Since the main report is "in charge" of pagination, the subreport Page event and page break controls are ignored. For some reason, the ForceNewPage property does work in subreports, so I think you can use: Me.Section(0).ForceNewPage = (Me![txtCount] Mod 8 = 0) -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|