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!! 🙂

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s