Discussion Locked

MS Access problems printing US/A4 paper

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have been struggling for some time now, with an issue that drives me crazy everytime I need to make additions to a database. The scenario is this. I have produced a database that is used worldwide, but mainly UK and USA. I uses MS Access 97 Runtime and is compiled as an MDE file format. There are some 120 reports within the application, that need to be printed on both A4 and US Letter. This is where the problem lies. I have tried to change the paper layout programatically, depending on where the user is using the database. However, it works on the uncompiled version (MDB), but I get an error message on the MDE version, saying that it is not possible to change the design of the report.

Does any one know of a way that I can change the layout of a report within an MDE file, so that I can stop creating 2 copies of a report (one for each format), as every time I do additions/changes, the reports formated to US Letter, revert back to A4, so I have to go through them one at a time to reset them.

6 replies

by mbarker734

Your easiest solution would be:

For reports that are to be printed in portrait calculate your total width including margins not to exceed 8 1/4" (= 210 mm)

For reports that are to be printed in landscape calculate your total width including margins not to exceed 11 1/2" (= 293 mm).

Yeah thats right it will not be centered then, but no matter, it sound like the reports are the same just the paper size is dirrent. A little more edging on one report or another will not be that drastic.
Good luck,

Mark

by lee

Thanks for the info. However, I am already doing this. To Expand the issue a bit more. The reports are designed here in the UK based on A4 paper size, when the reports are run in the USA, the user gets an error stating that the paper size does not match the printer, which is US Letter.

by jericho johnson

This is an annoying "feature" that has existed since Access 1.0, and apparently won't be fixed anytime soon. The new Access 2002 still behaves the same way.

My solution for this was to create a library database that contained the reports that need to be altered at runtime. This library database is then referenced in the main database. The library database must remain a regular .mdb, you can't turn it into a .mde.

Also, you will need to include some other things in the library database such as: links to the tables that contain the data for the reports, the queries that are the recordsource for the reports, and some code that will perform the needed alterations. You will also want a function in the library database that re-links the tables in the event that they are moved. This way, the main database takes care of figuring out where the tables are and calls this function in the library to tell the library to re-link them at a specified location.

Regarding the code, you can'tdirectly manipulate a report in the library from the main database. You must provide code in the library that performs the work, and then call this code from the main database.

I realize this means exposing your reports and a small amount of code to being viewed or altered, but it is a minimal amount of code, and if your user messes up one of the reports, you can just send them the reports.mdb file (or provide an installer that will re-install it for them).

If you are unfamiliar with theissues involved in creating and using library databases, I recommend the following book: "Access 97 Expert Solutions" by Stan Leszynski, publish by Que, ISBN 078970367X

by jericho johnson

Also, I have not done this with mine yet, but I believe that if you are using Access workgroup security, you can secure the library database and that will further prevent the users from messing with the reports in the library if they happen to have the full Access installed.

by lee

Sorry for the dalay in responding to your suggestion, I've been out of action for a few months. This looks like it couild be the only way of solving this issue, and I will give it a go to see if its practical. There are a lot of reports, that have many tables/queries feeding them.

This discussion is closed to new replies.