Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank page - what to do, what to do?

Status
Not open for further replies.

Trudye

Programmer
Sep 4, 2001
932
US
Hi everyone!

I have an Application report that contains over 100 fields. Naturally they are coming from different tables and in some cases the combining of tables.

One of the pages is only printed if the client is currently attending school. This is the last page to print. When the client does not attend school and there are no records for this page the report is printing a blank page.

By now I'm sure you have guessed my question. How the heck do I stop this blank page from printing if there are no records?

Thanks much
Trudye
 
Trudye,

I have a couple of questions regarding the source query/report:

1- Is this one report with page breaks?
2- Are there any subreports? If so, please describe.

Thanks,
Michael
 
Thanks Mike for responding.

Yes it has page breaks, the third (and final) page is causing the problem.

Because the data is accumulated from so many different tables there are many subforms. However on page 3 (the bane of my existance) there are four subforms. The Primary client's education information has 1 subform. The Spouse's education information also has 1 subform.

The subforms are linked to page 3 via a client id, and page 3 is linked to the main form via the same client id. The relationship between the subform and page 3 is a many to one relationship. For instance page 3 provides the name of the college the client attends and the subform lists the classes the ciient is currently enrolled in.

If you can think of anything I forgot to include let me know.

Trudye
 
Trudye,

First, let me state how I think your report is structured to make sure I am correctly understanding the specifics.

- There is a long detail section that contains many subforms and two page breaks. After the second page break, there are several subforms that may not have any information for a particular detail section (client).

- You would like to suppress the printing of this third page when the subforms contain no data (a blank third page)

Secondly, there are many individuals on this forum smarter than me who may be able to give you a better answer than what I am about to suggest.

1 - The page break forces a third page for each detail section regardless of the content. I cannot think of any way to suppress the third page.

2 - One possible solution is to move the page three subreports to a separate report.
- Have a different query for these items.
- Set cancel property to True in the the NoData event (this will cause the report to not print when there is no page three).
- Create some program code to loop through a recordset with each client and edit the SQL to include a where clause specific to each client and print reportpage1-2 and reportpage3.

The above solution is a bit of a pain, but its the only idea I can come up with (I had to do something similar with a report in the past).

Good Luck,
Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top