Tuesday 21 April, 2009

Load Report Failed.

Below code is working fine
CrystalDecisions.CrystalReports.Engine.ReportDocument rp;
string reportPath = Server.MapPath("LogReport.rpt");

rp = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

sql = "Select 'User Name :'+lmaster.l_name as username,'' as sno, userdetail.user_ip as uip from userdetail order by servertime";

dsmain = mydata.GetDataSet(sql, 1);// this method my own method will be return query data in dataset.
rp.FileName = reportPath;
rp.SetDataSource(dsmain.Tables[0]);
crviewer.ReportSource = rp;

5 comments:

  1. When i export my crystal report using the export button in the viewer then the next time when i run someother report in the same page i get load report failed error. Do you have any idea on this ? If you have any solutions . Please email me to manojbavikati@gmail.com

    ReplyDelete
  2. Please send me your code by mail, i will check it.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Ok, If you have any problem Just post your message on this...

    ReplyDelete
  5. Thanks I fix my problem changing reportdocument for reportname (ej: rptCheck() )

    Gracias

    ReplyDelete