Hi,
We are using latest version of crystal reports 2013, To show the reports we are using SAP report viewer which is available in latest version of CR 2013.
My problem is I want to open print dialog box programmatically which is opening from report viewer print button. Here I intentionally collapsed the print button from viewer control because I need to open print dialog from user control( Here I have a button to print if I click here it should call the report viewer print event to open print dialog box).
Regards,
Chakradhar.
Ravi KumarPosted Aug 1, 2014, 8:23 AM
you want for windows or web application.
the fallowing code for windows application.
CashInvoiceReport1 _cashInvoiceRpt = new CashInvoiceReport1();
CashInvoiceReport1 crt = _cashInvoiceRpt;
_cashInvoiceRpt.Load("@\\Reports\\CashInvoiceReport1.rpt");
_cashInvoiceRpt.SetDataSource(_ResultDs3.Tables[0].DefaultView);
PrintDialog pd = new PrintDialog();
_cashInvoiceRpt.PrintOptions.PrinterName = pd.PrinterSettings.PrinterName;
_cashInvoiceRpt.PrintToPrinter(1, false, 0, 0);