Solved

Visual Basic 6 Data Report

Posted on 2003-11-12
4
947 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 76
vb6 connector to mongodb 2 122
Looking for VB6 code to read SQL table export it to ascii 8 43
Visual Studio 2005 text editor 10 44
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…

820 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