<

How to underlay a section in Microsoft Access Reports

Published on
13,882 Points
5,482 Views
4 Endorsements
Last Modified:
Approved
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the Page Footer so that the bottom of my report would always be the same design. Here is an example of what my printed report would come out as:

 Broken report
In the end, this is what I wanted to end up with;

 Finished report
Another issue was that I wanted my horizontal gridlines to run all the way to the bottom of the report regardless of whether there was enough data on the page to fill the detail section to the bottom or not.

I finally came to a function called MoveLayout. When you set movelayout to false, the section basically becomes suppressed and your other sections will print on top of that section just as they do in Crystal Reports.

In my example the best section for me to underlay to accomplish my goal was the page header section. By creating the page header almost the size of the entire page and then setting the On Format = to Me.MoveLayout = False, I could design the section which acts as the backround image for the entire page. In other words, I could draw up all of my borders and gridlines which would then display through the entire page without any breaks.

Most likely it will take a little time tweaking the exact alignment you are looking for as in my case I needed some white space at the top of the page header to account for the Group Header that would appear there. Here is my example of my design;

Thanks! Underlay Page

Other things I did with the report was to set the GroupHeader as Repeat Section so that if my details did span multiple pages, the groupheader would always reprint.

Let me know if you have any questions as I may have forgotten some details to this.. This is my first Article I'm posting so please be sure to comment.
4
Comment
5 Comments
LVL 19

Expert Comment

by:Richard Daneke
This kind of report may be easier to code as a mail merge into a Word Table.
Your grid layout and page header/footer would be in Word and the next record option in a Mail Merge can deliver the Access records.
Let me know if you want to discuss this further.
IMHO, Access reports are great for delivering the data, but not for filing in forms -- unless you want to add some VBA code!
0
LVL 74

Expert Comment

by:Jeffrey Coachman
Thanks for the article.

Reports with a "Grid" style layout come up here often.
As you can see, this is not something that is "easy" to do in Access reports.

I'll expand a bit on DoDahD's post about the distinction between "Forms" and "Reports"
The Grid style Report layout is basically a printout of a Form.
In other words, it is basically a form that you use the Access report engine to create.
This is why Grids are not easy to do in Access Reports.

Often a related question to this is how to "Pad" the report page with "empty" rows.
So what I typically do is set up the grid in the detail section, then pad the report with enough records to fill the page.

But again, alternate approaches are always welcome, so thanks for the submission.
As a reference, there are some great posts on the Lebans site on this topic:
http://www.lebans.com/PrintLines.htm

;-)

JeffCoachman
0
LVL 2

Author Comment

by:Jarred Meyer
Thanks for your input!

I'll look into these alternatives when this type of report comes up again! I'm always open to improving my methods..
0
LVL 60

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
I think the major thing to walk away with from this is the fact that you can address the entire page in a header event and with .movelayout false, continue on down the page overlaying anything you've placed on it.

That's never been obvious to anyone before and opens up the door for a wide range of things.  For example, placing a water mark on the page.

I believe everyone up till now has always visualized this as the report engine walking down the page and not thinking you could do anything below the current layout spot you were at.

 If you were trying to do anything with the page, you always used OnPage, but now that's not the only option.

Definitely something new that was brought to light and one to keep in the bag of Access tricks.

Jim.
0
LVL 74

Expert Comment

by:Jeffrey Coachman
No problem Buddy, I understand.

And to be fair, I do realize that you perhaps signed up here so that you could get "targeted" help, (not just Google Hits...)

The bottom line is that unless you are doing something fairly unique, they fastest way to an answer may be via Google.

Looping files in a folder, is like Filtering records by a form.
...it is a fairly standard question.

Now,  ...if I wanted to do something really unique like "underlay a section in Microsoft Access Report"
Then I would post a question here, and hopefully someone may have some insight...
;-)

Jeff
0

Featured Post

The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Join & Write a Comment

Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month