in my reportviewer aspx page I have a button GO and in the onbuttonclick event I reload my report, I also load my report on page_load event, the report shows on the first time I visit the page( page_load) but if I click the GO button, the report data dissapeared and there is only background left.
My report is a master report with 3 subreports and I set the datasource of these 3 subreports with dataset I got from our data access layer. (I do not think this matters since the first visit it works). Debug shows that the buttonOnclick event get triggered and the loadMyReport function get called again.
Code Snippet:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadMyReport();
}
}
protected void ButtonGo_OnClick(object sender, ImageClickEventArgs e)
{
LoadMyReport();
}
private void LoadReportNotifStatus()
{
this.ReportViewer1.Report = null;
DataSet ds = getDataSet1();
DataSet ds2 = getDataSet2();
DataSet ds3 = getDataSet3();
rptMyMaster rptMaster = new rptMyMaster();
rptMaster.SetSubReportDetailDataSource(ds);
rptMaster.SetSubReportSummaryDataSource(ds2);
rptMaster.SubReportChartDataBind(ds3);
this.ReportViewer1.Report =rptMaster;
}
thanks in advance.
-phelix
My report is a master report with 3 subreports and I set the datasource of these 3 subreports with dataset I got from our data access layer. (I do not think this matters since the first visit it works). Debug shows that the buttonOnclick event get triggered and the loadMyReport function get called again.
Code Snippet:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadMyReport();
}
}
protected void ButtonGo_OnClick(object sender, ImageClickEventArgs e)
{
LoadMyReport();
}
private void LoadReportNotifStatus()
{
this.ReportViewer1.Report = null;
DataSet ds = getDataSet1();
DataSet ds2 = getDataSet2();
DataSet ds3 = getDataSet3();
rptMyMaster rptMaster = new rptMyMaster();
rptMaster.SetSubReportDetailDataSource(ds);
rptMaster.SetSubReportSummaryDataSource(ds2);
rptMaster.SubReportChartDataBind(ds3);
this.ReportViewer1.Report =rptMaster;
}
thanks in advance.
-phelix