Solved

Crystal Reports from within VB 5

Posted on 1998-07-21
5
193 Views
Last Modified: 2010-05-03
I am printing a Crystal Report from within VB. I only have one report to print so I am using the "easy" method of adding the Crystal Reports component and then simply attaching a code to a command button to execute the report. I have it set to pop up in a window by default.  The report needs to be printed on two sides. When I created the report I set it that way, and if I print from Crystal Reports program it does print two sided, however it does not from within VB. Can someone please help. I would be happy to even just have a normal print dialog box that would pop up to allow me to change it to two sided. Thank you
0
Comment
Question by:webguru
  • 3
  • 2
5 Comments
 

Author Comment

by:webguru
Comment Utility
Adjusted points to 200
0
 
LVL 4

Accepted Solution

by:
trkcorp earned 200 total points
Comment Utility
So, have just that... The crystal report control has a printerselect method that presents a printer dialog:

CrystalReport1.PrinterSelect

This imposes an "override" for the run of the report without permanently setting printer attributes and allows the user access to select a printer and set its properties.

Another option is to just use the common dialog control:

CommonDialog1.ShowPrinter

which is a system change of printer but still allows the user to select a printer and set its properties.
0
 

Author Comment

by:webguru
Comment Utility
I do not believe my Crystal Reports 4.6 supports crystalreports.PrinterSelect however the commondialog component worked fine. Thank You for your help
0
 
LVL 4

Expert Comment

by:trkcorp
Comment Utility
Great, glad to be of service.
0
 

Author Comment

by:webguru
Comment Utility
Hey trkcorp, could you read my other question? And see if you can help. I have worked on this problem for a while now to no avail.
If you can thanks, if not its ok,

jeff
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

16 Experts available now in Live!

Get 1:1 Help Now