PDA

Click to See Complete Forum and Search --> : printer dialog box


jhermiz
Dec 4th, 2003, 08:15 AM
When I use my viewer to print a report it shows the printer selected that I created the report. I am trying to allow the end user to select a printer so that he / she is not restricted to the one that is set by crystal. The problem is I dont know how to get crystal's print dialog box to appear.

Anyone know how ?

Thanks,
Jon

ARPRINCE
Dec 9th, 2003, 08:28 AM
Dim crxReport As CRAXDRT.Report

crxReport.PrinterSetup (0) '<--- Brings up the Printer Dialog Box before the report.
'View the report.
CRViewer91.ReportSource = crxReport
CRViewer91.ViewReport

Jigabyte
Feb 3rd, 2011, 06:49 AM
For some reason I get the page setup first with a printer button on. How can I get it to go to the printer dialog box?

Thanks,

Jiggy!

wes4dbt
Feb 3rd, 2011, 11:47 AM
By default when you click the "Print" icon in the CR viewer it will display the print dialog. At least mine does. Try removing any printer references in your code and try something simple like this.

This is a form with nothing but the CR viewer on it.

Dim rpt As New rptWaterSoldDaily
Dim frm As New frmReports

rpt.SetDataSource(dsR.Tables("wat"))
frm.CrystalReportViewer1.ReportSource = rpt
frm.Show()

Jigabyte
Feb 4th, 2011, 04:33 AM
Thanks, all sorted now :)