?
Solved

VB.Net ReportDocument(), option to Print to non-default Printer

Posted on 2007-03-21
2
Medium Priority
?
1,119 Views
Last Modified: 2012-06-22
Hello,

I have a Crystal Report that prints from my VB.Net application.  

Currently, I send the document directly to the printer, but Client is now asking for a way to select a Printer instead of going to default printer.

Here's my print event code:

Dim LabelReportDoc As New ReportDocument()

reportPath = Application.ExecutablePath
reportPath = reportPath.Substring(0, reportPath.LastIndexOf("\") + 1)
reportPath = reportPath & "DeloLabel.rpt"

LabelReportDoc.Load(reportPath)
LabelReportDoc.SetDataSource(dsLabel)

Is there a way to modifiy this to load into a PrintDialog Control?

I've done a Crystal Viewer controls before and know these have a Printer option here but would like to add this dialog to my form if possible.

Thanks,
JMO9966
0
Comment
Question by:JMO9966
  • 2
2 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 750 total points
ID: 18766807
Don't know if this will work.  Also it may cause problems if the printers use different printer drivers.

Look at this question
http://www.experts-exchange.com/Database/Reporting_/Crystal_Reports/Q_20762547.html

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 18865604
Glad i could help

mlmcc
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
Suggested Courses
Course of the Month17 days, 2 hours left to enroll

862 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