?
Solved

From VB set Paper Size of Crystal Report

Posted on 2003-03-03
10
Medium Priority
?
2,869 Views
Last Modified: 2007-12-19
I am printing reports from Visual Basic 6.0 using Crystal Reports version 8.

My Reports have been saved with the printer setup using A4 paper.

I need the reports to stay as they are but within my VB Code, be able to change the paper size to Letter.

Is this possible?
0
Comment
Question by:jarvoid
[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
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 1

Accepted Solution

by:
duoba earned 75 total points
ID: 8061913
Here is some sample code

obviously you first need to create the report.  before you run the rerport through your code you
set the papersize to letter like this

    Report.PaperSize = crPaperLetter

Report being the name of the report not the crviewer.
0
 
LVL 1

Author Comment

by:jarvoid
ID: 8062064
I have no PaperSize property.

How do I get it?
0
 
LVL 1

Expert Comment

by:duoba
ID: 8062098
what is the value(report) you are setting your crviewer report source to.

This value(report) should be the report you have created and papersize should be a property.

send your code through and Ill have a look at it.  
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:duoba
ID: 8062115
Also have you got the correct refrences?
I have
-crystal reports activx designer runtime library
-crystal reports activx designer design and runtime library
and you obviously must have crystal report viewer control
0
 
LVL 1

Author Comment

by:jarvoid
ID: 8062156
Components:
Crystal Report Control ticked.
Crystal Report Viewer Control Unticked.

References:
Crystal Report 8 ActiveX Designer Run-Time Library

I have a Crystal Report Control on my form.

CrystalReport1.ReportFileName = "ListTest.rpt"
result = CrystalReport1.PrintReport

I don't think I use the Crystal Report Viewer control - I have a separate full version of Crystal Reports.
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 75 total points
ID: 8062222
0
 
LVL 1

Author Comment

by:jarvoid
ID: 8062364
Thanks for your help peoples - unfortunately it looks as though it is not possible without the use of the Crystal Report Viewer control which I do not use.  I use the control entitled "Crystal Report Control" (Crystl32.ocx)

I have a project with 200 reports all going to A4.  I may just have to duplicate each report and send the duplicated ones to Letter and choose the report based on a flag.  I was just hoping there was an easier way...
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8064562
YOu can use the printer select form and then set the properties when you run the report.

crRpt.PrinterSelect

mlmcc
0
 

Expert Comment

by:CleanupPing
ID: 9447383
jarvoid:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9456527
Glad I could help

mlmcc
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Six Sigma Control Plans
Introduction to Processes
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 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