Crystal Reports Problem

The following error loaded today when trying to output a crystal report from asp.Net:

Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object. Error in Filename.rpt: Unable to connect: incorrect log on parameters.

The problem was that I didn’t set the report’s DataSource. Next is the code that worked:

 

 

 

ReportDocument report = new ReportDocument();

 

 

report.Load(Server.MapPath(“Reports\Label.rpt”));

report.SetDataSource(dset);

report.ExportToDisk(ExportFormatType.PortableDocFormat, full_path);

report.Clone();

report.Dispose();

Hope this helps someone!! 🙂

 

 

 

 

Categories

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *