A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Blank Page when no data



 
 
Thread Tools Display Modes
  #1  
Old August 9th, 2005, 11:59 PM
Lorien2733
external usenet poster
 
Posts: n/a
Default Blank Page when no data

I have a report that lists data entry transactions. I want to print out a
checklist of possible errors for each batch entered. I put my checklist in
the Report Header section as a subreport with a page break afterit. When
there are possible errors, the checklist prints out just like I want but when
there are no errors I get a blank page before my listing. Is there some way
to print my checklist if there are errors without the blank page when there
aren't any error records?

TIA
Lynne
  #2  
Old August 10th, 2005, 04:23 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Instead of setting the ForceNewPage property of the section, you could add a
Page Break control from the Toolbox, and toggle its Visible property in the
Format event, depending on whether the subreport has data.

This kind of thing:
Me.[PageBreak1].Visible = Me.[Sub1].Report.HasData

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Lorien2733" wrote in message
...
I have a report that lists data entry transactions. I want to print out a
checklist of possible errors for each batch entered. I put my checklist in
the Report Header section as a subreport with a page break afterit. When
there are possible errors, the checklist prints out just like I want but
when
there are no errors I get a blank page before my listing. Is there some
way
to print my checklist if there are errors without the blank page when
there
aren't any error records?

TIA
Lynne



  #3  
Old August 11th, 2005, 11:04 PM
Lorien2733
external usenet poster
 
Posts: n/a
Default



"Allen Browne" wrote:

Instead of setting the ForceNewPage property of the section, you could add a
Page Break control from the Toolbox, and toggle its Visible property in the
Format event, depending on whether the subreport has data.

This kind of thing:
Me.[PageBreak1].Visible = Me.[Sub1].Report.HasData


Ok. I put the code in the PageHeaderSection On Format event of my report and
it gives me the page breaks I want with no blank pages. Thank you so much.
The thing is - for some reason the Page header section of my subreport just
is not printing. It just skips over that section. Any ideas?










  #4  
Old August 12th, 2005, 02:20 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

You put it in a page header? I don't understand that.

The idea of toggling the Visible property of the page break control is to
force Access to give you a page break conditionally. But if it is formatting
a page header for you, then a page break has already been calculated?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Lorien2733" wrote in message
...


"Allen Browne" wrote:

Instead of setting the ForceNewPage property of the section, you could
add a
Page Break control from the Toolbox, and toggle its Visible property in
the
Format event, depending on whether the subreport has data.

This kind of thing:
Me.[PageBreak1].Visible = Me.[Sub1].Report.HasData


Ok. I put the code in the PageHeaderSection On Format event of my report
and
it gives me the page breaks I want with no blank pages. Thank you so much.
The thing is - for some reason the Page header section of my subreport
just
is not printing. It just skips over that section. Any ideas?



  #5  
Old August 12th, 2005, 10:15 PM
Lorien2733
external usenet poster
 
Posts: n/a
Default



"Allen Browne" wrote:

You put it in a page header? I don't understand that.


I said that wrong - what I meant was I put the code in the REPORT header.

Let me try to explain this again...
I have a report that prints a listing of transactions entered into my
payroll application. I wanted to add an additional page to the report that
would list any possible pay date duplications. Some pay date duplications may
be valid so someone has to double check the errors. The idea is to add kind
of like a "cover letter" to the report so that the user has to do the
research on their end and sign off on any kickouts. So I added the "cover
letter" as a SubForm(Sub1) in the ReportHeaderSection of the main report. The
initial problem was that when there were no errors I got a blank page where
the subreport would have been. I added the code you suggested in the OnFormat
event of the ReportHeaderSection of the main report and that took care of the
problem of the blank pages.
The problem now is that the PageHeader of the subform does not print. SUB1
has ReportHeader and footer and PageHeader and footer etc of its own. When I
display SUB1 by itself, the pageheader prints. But when I display the entire
report, everything comes out fine - the subreport prints, the pagebreaks are
where they should be - except for some reason the PageHeaderSection of SUB1
does NOT show up. All the other sections of the subreport and the main
report are there. The PageHeaderSection of the main report is fine. Just the
PageHeader of the subreport is missing. I have my column headings in this
section and the report doesn't look as nice if I move them somewhere else.
This is a small thing, I know, but it makes me crazy when I can't figure
these things out.

I appreciate your help, Allen.
Thanks
Lynne



  #6  
Old August 13th, 2005, 04:55 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Well, I'm not surprised it doesn't work the report header either.

In the main report, put the subreport into a section of its own. You may
need to create another group header or footer in the Sorting And Grouping
dialog (View menu.) For example if you create a group footer on the primary
key field, it will occur for every record, and you now have a separate
footer for the subreport for every record.

Now, place the page break control in this section on the main report, and
set its Visible property in the section's Format event.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Lorien2733" wrote in message
...


"Allen Browne" wrote:

You put it in a page header? I don't understand that.


I said that wrong - what I meant was I put the code in the REPORT header.

Let me try to explain this again...
I have a report that prints a listing of transactions entered into my
payroll application. I wanted to add an additional page to the report that
would list any possible pay date duplications. Some pay date duplications
may
be valid so someone has to double check the errors. The idea is to add
kind
of like a "cover letter" to the report so that the user has to do the
research on their end and sign off on any kickouts. So I added the "cover
letter" as a SubForm(Sub1) in the ReportHeaderSection of the main report.
The
initial problem was that when there were no errors I got a blank page
where
the subreport would have been. I added the code you suggested in the
OnFormat
event of the ReportHeaderSection of the main report and that took care of
the
problem of the blank pages.
The problem now is that the PageHeader of the subform does not print. SUB1
has ReportHeader and footer and PageHeader and footer etc of its own. When
I
display SUB1 by itself, the pageheader prints. But when I display the
entire
report, everything comes out fine - the subreport prints, the pagebreaks
are
where they should be - except for some reason the PageHeaderSection of
SUB1
does NOT show up. All the other sections of the subreport and the main
report are there. The PageHeaderSection of the main report is fine. Just
the
PageHeader of the subreport is missing. I have my column headings in this
section and the report doesn't look as nice if I move them somewhere else.
This is a small thing, I know, but it makes me crazy when I can't figure
these things out.

I appreciate your help, Allen.
Thanks
Lynne



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort pages? David General Discussion 15 May 13th, 2005 11:33 PM
Creating and linking to a one-record data access page Elizabeth S General Discussion 0 February 17th, 2005 10:35 AM
Generating a one-record ouptut from a query-based data access page Elizabeth S New Users 0 February 15th, 2005 05:15 PM
Is this possible with Excel Chart? q582gmzhi Charts and Charting 1 September 8th, 2004 03:33 AM
SQL view of messed up action queries Kendra Running & Setting Up Queries 2 August 31st, 2004 09:53 PM


All times are GMT +1. The time now is 02:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.