Solved

Visual Basic 6 Data Report

Posted on 2003-11-12
4
941 Views
Last Modified: 2013-11-25
I have a procedure in Visual Basic 6 that would print a report  using a data report.
The data report was designed to fit in a LEGAL SIZE PAPER ONLY, but what if the user's current paper size of its default printer was set to something different, lets say something shorter in size. The report would then come out different and thats a problem in our case.

Is there a way i can change the  paper size of the default printer (or other properties like paperquality and etc.) using Visual Basic ?

Thanks in advance...




rexmor
0
Comment
Question by:rexmor
4 Comments
 
LVL 2

Expert Comment

by:lttia1
ID: 9738150
0
 
LVL 9

Author Comment

by:rexmor
ID: 9744192
Im sorry but this one only works if using Printer.print command, but since im using a data report this has no effect on changing paper size. Thanks a lot.

<added by PashaMod from rexmor's post>

So, Instead of using Data Report and then have VB change its papersize to legal or letter, i found another more easy solution. I use Crystal Report and then use the following to change its papersize.  AND IT WORKS !!!

   If app Is Nothing Then Set app = CreateObject("Crystal.CRPE.Application")
   Set rpt = app.OpenReport(crystalreport file)
   
    rpt.PageSetup.paperSize = mypaperSize                **** SOLUTION *******
    Set m_crwView = rpt.Preview(windowtitle, 0, 0, 1155, 800, 0, 0)


rexmor
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 9781239
Question closed and points refunded

PashaMod
CS Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

895 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

11 Experts available now in Live!

Get 1:1 Help Now