Solved

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

Posted on 2007-03-21
2
1,090 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
[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
  • 2
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 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 100

Expert Comment

by:mlmcc
ID: 18865604
Glad i could help

mlmcc
0

Featured Post

Technology Partners: 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!

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 …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

739 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