Hi Ludek,
Thank you very much for your respone.
Ok now I understand CrystalReportViewer is to view the data and reportdocument is to print.
PrivateSub WebImgButPrintCustIssSelCust_Click(sender AsObject, e As Infragistics.WebUI.WebDataInput.ButtonEventArgs) Handles WebImgButPrintCustIssSelCust.Click
reportdocument.Load(Server.MapPath("~/Reports/CustomerIssueImgReportSelCust.rpt"))
reportdocument.SetParameterValue("CustomerId", TCtrCustomerToPrint.Text)
reportdocument.Refresh()
reportdocument.PrintToPrinter(1, False, 0, 0)
EndSub
I am trying to print this report from a button in a page of the application, but when I entered the reportdocument.Refresh the page crash, I tested without the Refresh and works but I need to refresh the data with the new values, transactions for that new customer.
In the previous code I sent last week I was mixing the crystalreportviewer control and reportdocument, if I want just to print to the printer I shouldn't need the crystalreportviewer.refresh. WHAT AM I DOING BAD ??? THANKS IN ADVANCE.