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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report with Alternating reports on alternating pages 1

Status
Not open for further replies.

gregor1211

Technical User
Aug 25, 2006
3
US
- Access 2002. Report formatted legal landscape.
- The report is in a grid format and contains alternating pages where Salary and Bonus info are displayed on page one for employees 1-X and Stock info is displayed on page 2 for employees 1-x.
- This patter continues on the following pages (i.e. odd pages show Salary and Bonus info, and even pages show stock info for the same set of employees).
- Each page has it's own column headers, report headers, and report footers.
- The source data is in a single table in linear format - meaning, a single row contains all salary, bonus and stock info for a single employee.
- I was able to accomplish this alternating page layout by strategically placing the stock data, intended for page 2, far to the right on the report layout. Access naturally wraps the contents onto page two.
- I've now run into a roadblock. I need to add a few additional columns to page 2 of my report, but I've reached the max width of the Access report which is 22"

- Question - what is the best way to create a report which alternates pages using linear data from a single table? I've thought of using subreport, but was hoping there might be an easier way.

This forum is great! Thanks for the help.

Greg
 
A subreport is not really that difficult to implement. To get the report to alternate pages, put a page break control before your subreport (and maybe after it too).
 
Thanks Rjoubert. I took your advice and tried the subreports, but I'm still having problems. I've used the layout indicated below: a master report with two sub reports embedded and a page break between them. But all I get is Report#1 (all pages) followed by Report #2 (all pages). The alternating reports I'd expected didn't work. Any thoughts?
[tt]
+--------------------------------------+
| Master report w/ no data source |
| |
| +----------------------+ |
| | Sub report 1 Salary | |
| | and bonus | |
| | /w PersonID as key | |
| +----------------------+ |
| |
| [page break] |
| |
| +----------------------+ |
| | Sub report 2 (Stock) | |
| | w/ PersonID as key | |
| | | |
| +----------------------+ |
| |
+--------------------------------------+
[/tt]


 
You will need a data source for the main report and link child and master fields for each subform.
 
Remou,

When I add the data source to the parent/main report and link the fields, I then get on one record per page (eg. Salary data Emp#1 = page one, salary date emp#2 = page 2. I need Page 1 to contain salary records for employees 1 to n (or as many as can fit on the page). And page 2 to contain Stock/Equity data for the same group of employees (1 to n).
 
I seem to recall that the way to do this is to set up an A3 landscape page in the report window. Create a query that joins the two datasets and use this as the data source for the report. Place the fields in a line across the page (salary, stock). What should happen is that Access will print half the A3 page on one A4 page and the other half on another A4 page. You will need to do a little calculation on the placement of fields to get the margins the way you want.
 
I have a similar problem, perhaps more complicated since my two reports, based on the same data use multiple columns. I'd like facing pages to exactly correspond 1-1 for each record.
I'll be using a fixed size box so the number of records per page will be fixed.

One idea I've thought of is to simply double up the data with a flag field (odd/even flag with the original table appended to itself, once with flag set odd once and even once ). I have sequence numbers, so i can modulo those to sort the data so that one page of 'evens' are followed by one page of 'odds'.

I haven't used subreports as yet but assume that I can select one report or the other to fill out n records on the even page and then the duplicated n records on the odd page.
Does this sound reasonable?

Perhaps this could work for you, though it seems a bit brutish.

Also, I am curious if you were able to accomplish your alternating report involving a 'single' page-column per record.
======================================================
non Access related background info:

What I really wish is that I could just alternate the pages-- I print to a generic postscript driver that is acceptable to be converted at the commercial publishing site lulu.com-- If I make the PDFs myself their printer can't RIP them. The PS utilities can do this theoretically, but only by brute force of specifying page numbers for outputting a concatenated file of the two reports. This would be helpful for a number of books I'd like to publish... I'm experimenting with different formats to simulate flash cards in book form. I've made a couple of hundred thousand flash cards for people and the facing page idea might lighten my load :)
======================================================


 
roborant
Have you looked at my suggestion, posted 28 Aug 06 12:53?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top