Solved

Visual Basic 6 Data Report

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

759 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

24 Experts available now in Live!

Get 1:1 Help Now