Access - Report - Blank record and end of page code HELP! : )

Access - Report - Blank record and end of page code HELP! : )

am 04.01.2008 13:44:16 von harley.mcnerthney

I have an Access 2007 problem and I would just like to know if there
is some sort of solution out there. The problem is, when I build a
report that will 99% of the time be one page or less maybe even a
half
page. I end up with a giant space in the middle of my report. I
want
to fill that space with empty records but the records must only be
enough to fill the page and still leave the report foot at the bottom
of the last page. Those empty records in combination with the
gridlines surrounding the records will fill the blank space.
I was sure!!! I would find something in a forum
about
this situation, I searched extensively. I have even posted in
multiple forums and it seemingly has everyone stumped. I am linking
to a screenshot of a blank report to give you an idea of what I have
been dealing with. I will take any form of help possible, even if it
is go buy my book this book the answer is between page 1 and 1000 : )
I thought this would be something that would be very important to
certain types of reports and could be verrrrry helpful to the Access
Community.


With Respect,
Harley

Re: Access - Report - Blank record and end of page code HELP! : )

am 04.01.2008 15:23:59 von Deano

wrote in message
news:b8f8096d-cb07-499b-8e1f-c3531d9c31ef@1g2000hsl.googlegr oups.com...
> I have an Access 2007 problem and I would just like to know if there
> is some sort of solution out there. The problem is, when I build a
> report that will 99% of the time be one page or less maybe even a
> half
> page. I end up with a giant space in the middle of my report. I
> want
> to fill that space with empty records but the records must only be
> enough to fill the page and still leave the report foot at the bottom
> of the last page. Those empty records in combination with the
> gridlines surrounding the records will fill the blank space.

There's no link in your post. Do you have subreports by any chance? I have
the problem that if no records are entered for a category of staff then the
subreport will be empty and the report will look a bit odd. The report
footer will always be on the last page by it's nature.
Displaying empty records does sound a bit odd, unless you want a message to
appear stating the report returned null records.

Re: Access - Report - Blank record and end of page code HELP! : )

am 04.01.2008 18:21:37 von Salad

harley.mcnerthney@gmail.com wrote:

> I have an Access 2007 problem and I would just like to know if there
> is some sort of solution out there. The problem is, when I build a
> report that will 99% of the time be one page or less maybe even a
> half
> page. I end up with a giant space in the middle of my report. I
> want
> to fill that space with empty records but the records must only be
> enough to fill the page and still leave the report foot at the bottom
> of the last page. Those empty records in combination with the
> gridlines surrounding the records will fill the blank space.
> I was sure!!! I would find something in a forum
> about
> this situation, I searched extensively. I have even posted in
> multiple forums and it seemingly has everyone stumped. I am linking
> to a screenshot of a blank report to give you an idea of what I have
> been dealing with. I will take any form of help possible, even if it
> is go buy my book this book the answer is between page 1 and 1000 : )
> I thought this would be something that would be very important to
> certain types of reports and could be verrrrry helpful to the Access
> Community.
>
>
> With Respect,
> Harley
>
This is a suggestion that might work. Change your reports recordsource.
Add a column like
SortOrder : 1

Next, create a query that will make a blank record. Something like
select Null As Fld1, Null As Fld2,...,2 As SortOrder From Table,...

Now make the recordsource a UNION query. Then go into Sorting and
Grouping and sort on the field SortOrder. This will put the blank
record at the bottom of the list.

You probably would want to know how many grid rows you can print on the
report.

You'd want a counter to determine how many "real" rows have printed and
then you know how many blank records to print.

In help, look for MoveLayout, NextRecord, or PrintSection. When you get
to the blank record you'd want to set the NextRecord to false but
MoveLayout, PrintSection to true in the detail band until you get to
TotalRows - ActualRowCount = 1 then set the NextRecord to True.

White Horse
http://www.youtube.com/watch?v=I8j2ej5jqQw

Re: Access - Report - Blank record and end of page code HELP! : )

am 06.01.2008 02:32:18 von Tony Toews

"harley.mcnerthney@gmail.com" wrote:

>I have an Access 2007 problem and I would just like to know if there
>is some sort of solution out there. The problem is, when I build a
>report that will 99% of the time be one page or less maybe even a
>half page. I end up with a giant space in the middle of my report. I
>want >to fill that space with empty records but the records must only be
>enough to fill the page and still leave the report foot at the bottom
>of the last page.

Why put the report footer at the bottom of the last page? Why not just leave it at
the last line anywhere on the page?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

Re: Access - Report - Blank record and end of page code HELP! : )

am 06.01.2008 18:17:28 von Salad

Tony Toews [MVP] wrote:
> "harley.mcnerthney@gmail.com" wrote:
>
>
>>I have an Access 2007 problem and I would just like to know if there
>>is some sort of solution out there. The problem is, when I build a
>>report that will 99% of the time be one page or less maybe even a
>>half page. I end up with a giant space in the middle of my report. I
>>want >to fill that space with empty records but the records must only be
>>enough to fill the page and still leave the report foot at the bottom
>>of the last page.
>
>
> Why put the report footer at the bottom of the last page? Why not just leave it at
> the last line anywhere on the page?
>
> Tony

If I read the OPs post correctly by guessing, I figured he has the
borderstyle set to solid for the detail band fields thus creating a
grid. Since there aren't enough records to fill the page, he wanted the
grid to follow thru to the bottom of the page with blank values.