Solved

Visual Basic 6 Data Report

Posted on 2003-11-12
4
944 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to file 3 74
Using MS Code on my Mac 6 67
Recommendation vb6 to vb.net or others 14 148
which modules are active in VB6 project? 6 10
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

770 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