473,378 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Print Margin Problem in Reports

tdw
206 100+
Hi,

I have searched for this answer to no avail. I've found some very similar questions, but no answers that seem to apply.

Here's the deal: All reports work fine on my computer. My boss, however, can't get reports to print correctly from his. What is happening is that his page margins in the 'page setup' keep resetting to include over 7" on the right, thus only allowing a narrow sliver on the left side of the page to print, thus, in turn, causing a one page report to turn into over 30 pages of tiny bits.

I tried correcting the margins, and they stay put, until....

At this point I should explain how the database opens:

1. It is a Front-end Back-end database. The back-end is on the server, front-end on each user's computer.

2. Often I make updates and improvements to the design of the forms and reports in the front-end, and then save the changes to a copy of the front-end, which also resides on the server.

3. Each user has an icon on their desktop which launches a .bat file which copies the front-end database file from the server onto the user's computer, and then it opens that newly copied front-end database file on their computer. This way, every time someone opens the database, they are sure to have the latest changes and improvements.

Now back to the print margin issue:

On my boss's computer, after I have adjusted the margins using the report's page setup, they stay fixed as long as the database remains open. They ALSO stay fixed if I close the database, but then re-open it directly from the front-end file on his computer (skipping the .bat file). However, if I open it the normal way, using the .bat file icon (meaning that the copy on the server copies over to his computer and then opens), now suddenly his margins are all screwed up again.

I have tested it and tested it, and it does that on his computer every time, and never on mine! Mine opens using the same process as his.

Help!

Thanks ahead of time
Jun 4 '08 #1
8 15106
Lysander
344 Expert 100+
I think this is related to another question I answered yesterday about 'currency' format. How does 'Currency' format relate to print margins you say!

When you specify 'Currency', Access does not store currency, it stores whatever currency format you have on your PC at the time.

I bet that when you set up your report and give it say, 1cm margin, it does not store 1cm margin, it looks at your print driver and works out what code to send based on that driver.

Go to a different PC, with a different print driver, and the margins will change.

This is just a guess, I can't test it here but check out your boss's PC has the same print driver as you. If not, see if you can make them the same and see if that solves your problem
Jun 5 '08 #2
ADezii
8,834 Expert 8TB
I haven't actually tried this, but how about pro-grammatically changing the Left and Right Margins for your Report, then Print and Close it? The code should be:
Expand|Select|Wrap|Line Numbers
  1. 'Programmatically change the Left and Right Margins
  2. Const conTwipsPerInch As Long = 1440
  3. Const conReport As String = "<Your Report Name>"
  4.  
  5. DoCmd.OpenReport conReport, View:=acViewPreview, WindowMode:=acHidden
  6.  
  7. With Reports(conReport).Printer
  8.   .LeftMargin = 1 * conTwipsPerInch         '1" Left Margin
  9.   .RightMargin = 0.5 * conTwipsPerInch      '1/2" Right Margin
  10. End With
  11.  
  12. DoCmd.OpenReport conReport, acViewNormal
  13. DoCmd.Close acReport, conReport
Jun 6 '08 #3
tdw
206 100+
I haven't actually tried this, but how about pro-grammatically changing the Left and Right Margins for your Report, then Print and Close it? The code should be:
Expand|Select|Wrap|Line Numbers
  1. 'Programmatically change the Left and Right Margins
  2. Const conTwipsPerInch As Long = 1440
  3. Const conReport As String = "<Your Report Name>"
  4.  
  5. DoCmd.OpenReport conReport, View:=acViewPreview, WindowMode:=acHidden
  6.  
  7. With Reports(conReport).Printer
  8.   .LeftMargin = 1 * conTwipsPerInch         '1" Left Margin
  9.   .RightMargin = 0.5 * conTwipsPerInch      '1/2" Right Margin
  10. End With
  11.  
  12. DoCmd.OpenReport conReport, acViewNormal
  13. DoCmd.Close acReport, conReport
Thanks, I will try that and let you know. Currently I'm using a macro, but if I understand this correctly, this code would take the place of that macro.

In response to Lysander, yes the same print drivers are on all computers. In fact, my boss's computer does exactly the same thing no matter which of our several printers is used. I tried changing his default printer to each of them, and it didn't change anything. So it's definitely something about his computer (or his copy of Access?).
Jun 6 '08 #4
ADezii
8,834 Expert 8TB
Thanks, I will try that and let you know. Currently I'm using a macro, but if I understand this correctly, this code would take the place of that macro.

In response to Lysander, yes the same print drivers are on all computers. In fact, my boss's computer does exactly the same thing no matter which of our several printers is used. I tried changing his default printer to each of them, and it didn't change anything. So it's definitely something about his computer (or his copy of Access?).
Thanks, I will try that and let you know. Currently I'm using a macro, but if I understand this correctly, this code would take the place of that macro.
Yes it would, your current Macro will be replaced by this code.
Jun 6 '08 #5
tdw
206 100+
Yes it would, your current Macro will be replaced by this code.
This is really weird. I made the changes, and the changes work perfectly well, except for on my boss's computer!! His computer still does exactly the same thing! He has no trouble with printing from any other program.

Here's an example of what it does.

Let's use this paragraph as the example. Obviously the report is more than just a paragraph of text, but hopefully you'll see what I'm trying to demonstrate. Instead of printing the report as a whole, it prints in pieces. So if this paragraph were the form it would be like this:

page 1

Let's use this

page 2

paragraph as the

page 3

example. Obviously

page 4

the report is more

page 5

than just

etc etc etc until finally the whole thing has printed in pieces (around 30 pages, when the report should have all been on one page).
Jun 7 '08 #6
tdw
206 100+
This is really weird. I made the changes, and the changes work perfectly well, except for on my boss's computer!! His computer still does exactly the same thing! He has no trouble with printing from any other program.

Here's an example of what it does.

Let's use this paragraph as the example. Obviously the report is more than just a paragraph of text, but hopefully you'll see what I'm trying to demonstrate. Instead of printing the report as a whole, it prints in pieces. So if this paragraph were the form it would be like this:

page 1

Let's use this

page 2

paragraph as the

page 3

example. Obviously

page 4

the report is more

page 5

than just

etc etc etc until finally the whole thing has printed in pieces (around 30 pages, when the report should have all been on one page).
bump bump bump bump bump :-)
Jun 12 '08 #7
nspader
78
2 questions. These both pertain to the Access Options menu.

Under the General Tab is the Track auto name corrections checked? If so It shouldnt be. That will keep the Margins from defaulting to the PC's and will maintain the DB's margin settings.

Secondly, under the same tab do the margins's show the way you would want them to.

I found that this was a problem with my reporting. I would set the margins and the view (landscape or portrait) when designing and save it. But as soon as I close access and reopen it I would lose what I did.

A way that I used to ensure this wouldnt happen on a nother PC was to use a line of code in the swtichboard load option (or whatever form appears when the program is opened). I will place it below in case you want to try it.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.  
  3.     Application.SetOption "Left Margin", 0.5
  4.     Application.SetOption "Right Margin", 0.5
  5.     Application.SetOption "Top Margin", 0.5
  6.     Application.SetOption "Bottom Margin", 0.5
  7.     Application.SetOption "Track Name AutoCorrect Info", False
  8.  
  9. End Sub
  10.  
I hope this is helpful

Nick
Jun 12 '08 #8
tdw
206 100+
2 questions. These both pertain to the Access Options menu.

Under the General Tab is the Track auto name corrections checked? If so It shouldnt be. That will keep the Margins from defaulting to the PC's and will maintain the DB's margin settings.

Secondly, under the same tab do the margins's show the way you would want them to.

I found that this was a problem with my reporting. I would set the margins and the view (landscape or portrait) when designing and save it. But as soon as I close access and reopen it I would lose what I did.

A way that I used to ensure this wouldnt happen on a nother PC was to use a line of code in the swtichboard load option (or whatever form appears when the program is opened). I will place it below in case you want to try it.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.  
  3.     Application.SetOption "Left Margin", 0.5
  4.     Application.SetOption "Right Margin", 0.5
  5.     Application.SetOption "Top Margin", 0.5
  6.     Application.SetOption "Bottom Margin", 0.5
  7.     Application.SetOption "Track Name AutoCorrect Info", False
  8.  
  9. End Sub
  10.  
I hope this is helpful

Nick
box is unchecked and margins are set right in that tab.

I tried similar code in the button that launches the report, but I will try it on the switchboard. Thanks!
Jun 12 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: MHenry | last post by:
Hi, I have 30 separate Access reports to print to pdf files. Presently, I print these reports to Acrobat pdf files one report at a time. I am looking for some help, or a program or add-in...
4
by: Alvaro Pereira | last post by:
I have a ASP.NET project that prints a report to a NETWORK- PRINTER. I have impersonate=true in my web.config, but all reports are printed under ASPNET user (the one that is setted in...
2
by: Rod | last post by:
We've got an old VB6 application which has 9 Crystal Reports it can print. These 9 reports are considered by our users to be in essence one "report", in the sense that they are all related and they...
4
by: kv29 | last post by:
Hi everyone! I really hope my problem will be a piece of cake for an expert coder :) I have a table with 100 records, and I need to print them all between 10 different reports based on each...
1
by: mhafeez | last post by:
I have an invoice system developed in MS Access and invoice developed in Crystal Report 8.5. Now i want to print crystal report developed invoice from MS Access application Invoice Screen Directly by...
4
by: mode67 | last post by:
In Access 2000, I have three reports, named as follows: rptCrew rptService rptWork All three reports pull information from the same table (e.g. tbl_Customers). I have one form called Customers...
3
by: mode67 | last post by:
I have one button printing 5 reports base on a Query with one criteria. It works BUT THE PROBLEM: I have to put in the date for each report so it will print. I want to put the date in once and...
4
by: mfuentes74 | last post by:
I have about 7 reports in access I need to print on a weekly basis. I wanted to know if there is any way I can do this faster then printing individual reports.
1
by: eneyardi | last post by:
It is possible to print all records in one click? for example i have Report name: Report1, Report2 and Report3 and in a form i have a combolist of employee1 and employee2, I want to print all 3...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.