Skip to Content
0
Former Member
Aug 10, 2011 at 12:09 PM

No valid report source is available error + crystal report on navigation

264 Views

Hi all,

am using c#,asp.net and crystal report for report.

have loaded data on a dataset and on clicking a button the page loads okay when i click on next button to navigate to next page of the report am getting the following error message *No valid report source is available"

this is my code

try

{

connection.Open();

da.Fill(ds, "Statement");

ds.Tables[0].TableName = "Statement";

//RateeReport = new RateeReport();

ReportDocument myReportDocument;

myReportDocument = new ReportDocument();

myReportDocument.Load(Server.MapPath("~/Reports/Statementreport.rpt"));

myReportDocument.SetDataSource(ds);

Session["Report"] = myReportDocument;

if (!IsPostBack)

{

CrystalReportViewer1.ReportSource = myReportDocument;

CrystalReportViewer1.DataBind();

}

else

{

CrystalReportViewer1.ReportSource = Session["Report"];

CrystalReportViewer1.DataBind();

}

}

please assist augently for me to navigate.