on 10-18-2011 5:50 PM
Hello
I have a aplication in Aspx , when call many times the same report and printer , appear the menssage error printer conection, and happen error in server, in my station in design not happen.
Bellow my code....
Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
report.Load(Server.MapPath("Razao.rpt"))
report.SetDatabaseLogon("User", "PassWord", "DataBase", "")
CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.ActiveX
CrystalReportViewer1.ReportSource = report
CrystalReportViewer1.RefreshReport()
For exit
CrystalReportViewer1.ReportSource = vbNull
CrystalReportViewer1.RefreshReport()
GC.Collect()
Response.Redirect("~/Default.aspx")
Thanks for help.
Hi,
What is the exact error message? Can you trap it with Try-Catch?
Are you doing Postback in your Page_Load?
A suggestion is to not use SetDatabaseLogon to log the report onto the database server, instead try using LogOnInfo. SetDatabaseLogon has some limitations and LogOnInfo is more reliable. LogOnInfo has to be set for each table in the report.
If you go to the SDK forum and search for LogOnInfo you will find a few samples.
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.