Solved

Visual Basic 6 Data Report

Posted on 2003-11-12
4
950 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

623 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