Solved

Datareport printing problem

Posted on 2002-05-09
8
337 Views
Last Modified: 2012-08-13
I have set up a printer with a custom page 11 x 5.5 inches and default layout to portrait in the printer control panel. When I run the report, it has no problem when viewing it. It is right exactly i want. 11x5.5 and portrait.
But when I click the button print, the print layout in dialog box always default to landscape, so I have to choose manually to portrait before print it to printer.
My question is how to set the default to portrait when clicking the button print? It has no problem when using the standard size such as letter. It's only problem when using a custom page.

Any comments and help would be appreciated.
0
Comment
Question by:falconew
8 Comments
 

Expert Comment

by:Mikkil
ID: 7001061
Falconew,

Use the printer object to confirm what you have done in the panel.

Mikkil
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7001408
There should be no need to change the printer properties in the Control Panel.  The Data Report (at least if you have isntalled SP4 or SP5) has properties to set this:
ReportWidth
Orientation
LeftMargin & RightMargin
BottomMargin & TopMargin

Anthony
0
 
LVL 1

Author Comment

by:falconew
ID: 7005087
When I set it to portrait using orientation property, an error message occur "Report width larger than paper". I have verified that my report is not larger than paper. I set the left and right margin to 0. and report width=10470.
When I change the paper height in the printer property to about 8 inch, the error didn't occur.
Even I change the paper width to 16inch, the error still occurs.
It is strange, why do I change the height the error didn't occur?
When I comment the orientation, the report shows correctly. But the problem is only when I click the button print on the report window, in the dialog box always default to landscape.

Any comments and help would be appreciated
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7009314
Again, are you using at least VB6 SP4?  If so, take a look at the following articles from MSDN:
FIX: Error Message "Report Width Is Larger Than the Paper Width" When Showing Data Report in Landscape (Q261193)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q261193&SD=MSKB&
FIX: Error Message "Report Width Is Larger Than the Paper Width" on Exporting Data Report (Q253555)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q253555&SD=MSKB&
PRB: Report Width is Larger than the Paper Width (Q197915)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q197915&SD=MSKB&

Anthony
0
 
LVL 1

Author Comment

by:falconew
ID: 7010025
I have installed VB6 SP5.. It is the same behaviour when I move to another OS.
I have also search the MSDN before posting this question here. From direction of MSDN I set the left and right margin to 0, and report width 10470 twips and 1440 twips equal 1 inch. So my report width is 10470/1440 = 7,2 inches.
In the printer property I set up a custom paper size 8.5 inches wide and 5.5 inches length and I set it as the default paper size for my printer. I also set it to portrait as the default.
The report show correctly in the preview windows of datareport which the length is 5.5 inch and the width is 8.5 and it is portrait. But when I click the button print on the preview report, it always default to landscape in the print dialog box. So I have to choose the portrait manually before printing the report.
When I set the orientation to portrait, the error occur 'The report larger than paper'. This doesn't happen when I use standard format such as letter, or I change the length of the custom size greater number such as 10 inches.

What's the problem..

Regards
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7011058
I am out of ideas.

Sorry I could not help any more,
Anthony
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7722520
falconew, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7780523
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now