hi i have a load report on asp page
i have load report on button click
but when i click on next navigation button
then it gives me error with popup
"No valid report source is available."
Help me
Thanks
my code is:
protected void Button1_Click(object sender, EventArgs e)
{
GetData();
}
private void GetData()
{
SqlConnection connection = new SqlConnection(strcon);
SqlCommand command = new SqlCommand("Select * from demoforreport WHERE role='" + TextBox1.Text + "'", connection);
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet dataset = new DataSet();
adapter.Fill(dataset, "demoforreport");
ReportDocument CustomerReport = new ReportDocument();
CustomerReport.Load(Server.MapPath("CrystalReport.rpt"));
CustomerReport.SetDataSource(dataset.Tables["demoforreport"]);
CrystalReportViewer1.ReportSource = CustomerReport;
CrystalReportViewer1.DataBind();
}