Auto Open Crystal Reports Print Dialog in ASP.NET

pbb

New member
Joined
Mar 7, 2006
Messages
1
Programming Experience
10+
I was trying to figure out how to get the ActiveX Print Control for Crystal Reports 10 to open when the report is generated in an ASP.NET web form. Business Objects tech support couldn't even come up with this solution. I'm using VB.NET in my ASP.NET app. In the Page Load event in my code behind for the page that has the report viewer control, I put this code:If Not IsPostBack ThenDim sJava As StringsJava = "javascript:__doPostBack('CRViewer:_ctl2:_ctl2','');"RegisterClientScriptBlock("printreport", "<script language=javascript>" + sJava + "</script>")End IfThis will trigger the ActiveX print control when the page is initially loaded. After you print the report you can decide what action the page takes in your code behind. "CRViewer" is the id of the report viewer control on my page.
 
Back
Top