WebReport loading multiple reports
I need to load frx file and set datasource using codebehind C#
In the sample below I am loading a frx Report and registering data to view report using WebReport Viewer:
.ASPX
- <cc1:WebReport ID="WebReport1" runat="server" Width="100%" Height="900px" OnStartReport="WebReport1_StartReport" />
.CS
//Set frx report
WebReport1.Report.Load(this.Server.MapPath("~/Reports/FastReport/rptAlunosDataNascimento.frx"));
//Get Data
//IList dataSource = get data here....
//RegisterData and view report
WebReport1.Report.RegisterData(dataSource, "ObjectDataSourceReport");
I put this code in the PageLoad and then in the StartReport.
Works fine when I am viewing report for the first time.
The problem occurs when I try to view the same report again. The data is not refreshing to reflect changes in the database or if dataSource returns different data.
What am I doing wrong?
Thanks in advance!
In the sample below I am loading a frx Report and registering data to view report using WebReport Viewer:
.ASPX
- <cc1:WebReport ID="WebReport1" runat="server" Width="100%" Height="900px" OnStartReport="WebReport1_StartReport" />
.CS
//Set frx report
WebReport1.Report.Load(this.Server.MapPath("~/Reports/FastReport/rptAlunosDataNascimento.frx"));
//Get Data
//IList dataSource = get data here....
//RegisterData and view report
WebReport1.Report.RegisterData(dataSource, "ObjectDataSourceReport");
I put this code in the PageLoad and then in the StartReport.
Works fine when I am viewing report for the first time.
The problem occurs when I try to view the same report again. The data is not refreshing to reflect changes in the database or if dataSource returns different data.
What am I doing wrong?
Thanks in advance!
Comments