![]() |
|
|
#1
|
|||
|
|||
|
I have a main report that has four subreports. I need each subreport to begin on a new page. The problem is that whenever a subreport has no data, I get a blank page at the end of my report.
All my sections have CanShrink to Yes. All my subreport placeholders have the same CanShrink to Yes. Why do I still get a blank page? Thanks in advance. Ray |
|
#2
|
|||
|
|||
|
Are all of these subreports in the same section of the main report? If so, did you put in page break controls? If not, do you have the sections configured to start new pages after the section?
|
|
#3
|
|||
|
|||
|
I originally tried to put the subreports in the same section with page breaks, but that caused page breaks when subreports were empty, causing a blank page at the end, sometimes in the middle.
So I decided to create 4 separate sections (one for each subreport) and then I configured the sections to start a new page after each section. Again, that caused a blank page at the end, whenever the last subreport had no data. The problem is that there's no way of knowing which subreport will have no data (that is always possible). Access then adds a page break. Thanks! |
|
#4
|
|||
|
|||
|
Do your subreports all have the same layout? If so, we may be able to get creative using a UNION query for your source...
|
|
#5
|
|||
|
|||
|
Yes, they do have the same layout but keep in mind, each subreport has very specific conditions. The queries behind each subreport are not trivial.
Thanks! |
|
#6
|
|||
|
|||
|
That's OK. Can you post the SQL for each query?
|
|
#7
|
|||
|
|||
|
Patrick,
I solved my problem. It was a good idea that I placed the subreports in separate sections. However, I found that I had some sections' KeepTogether property to yes. This forced page breaks whenever the section couldn't fit on the remaining page. So I set all KeepTogether's to No. Then I placed PageBreak controls in each of the sections. With a little code behind the OnFormat of each section I set the PageBreak controls to False and/or True depending on the HasData property of my subreports. Everything is fine now. Thanks ! Ray |
|
#8
|
|||
|
|||
|
Glad you got it working, Ray
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reset page number and total page number for each group | lisadailey | Reports | 1 | 03-12-2009 07:55 AM |
| Access and Web page | mahlambane | Access | 1 | 11-18-2008 08:43 AM |
| Hiding subreports | aouellette | Reports | 0 | 09-12-2008 06:02 AM |
| Page Footer Top | RHall | Reports | 3 | 12-15-2005 06:35 AM |