cancel
Showing results for 
Search instead for 
Did you mean: 

After call crystalview many times , error.....

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member292966
Active Contributor
0 Kudos

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