this code gives me error Object reference not set to an instance of an object
using (ReportDocument report = new ReportDocument())
{
report.Load(Server.MapPath("~/Crystal Reports/CrReport10.rpt"));
ViewState["dtgrid"] = dt_grid;
report.SetDataSource(dt_grid);
crvCMSettleBill.RefreshReport();
crvCMSettleBill.ReportSource = report;
crvCMSettleBill.ReuseParameterValuesOnRefresh = true;
}
But report works fine when coding like this without using using statement.
ReportDocument report = new ReportDocument();
report.Load(Server.MapPath("~/Crystal Reports/CrReport10.rpt"));
ViewState["dtgrid"] = dt_grid;
report.SetDataSource(dt_grid);
crvCMSettleBill.RefreshReport();
crvCMSettleBill.ReportSource = report;
crvCMSettleBill.ReuseParameterValuesOnRefresh = true;
please help me sort out this issue..
thanks regards