Hello everybody!
We are using Telerik Reporting in an ASP .NET Application.
We had some issues with the report not showing while fetching data, which led to the application seeming to not respond.
To overcome this issue we initialized the report at first with no data (i.e. Report Parameters not set) and placed an ASP Update Panel and ASP Timer.
In the Tick event of the Timer the report parameters are set and the report is forced to update the data using the new report parameters. Below is a snippet of the update method called by the tick event of the timer.
In the NeedDataSource event of the report we are fetching our data using a custom business logic object (see below):
The problem is that sometimes the report is showing data and sometimes not.
If we force a second GET request to the page that renders the report everything is working fine.
Some idea what is causing this?
We are using Telerik Reporting in an ASP .NET Application.
We had some issues with the report not showing while fetching data, which led to the application seeming to not respond.
To overcome this issue we initialized the report at first with no data (i.e. Report Parameters not set) and placed an ASP Update Panel and ASP Timer.
In the Tick event of the Timer the report parameters are set and the report is forced to update the data using the new report parameters. Below is a snippet of the update method called by the tick event of the timer.
/// <summary>
/// Updates the report.
/// </summary>
public
void
UpdateReport()
{
AcceptanceProtocol.AcceptanceProtocol report =
this
.ReportViewer1.Report
as
AcceptanceProtocol.AcceptanceProtocol;
report.SetFilters(companyId, userId, deviceId, cultureName);
this
.ReportViewer1.Visible =
true
;
this
.ReportViewer1.RefreshReport();
}
In the NeedDataSource event of the report we are fetching our data using a custom business logic object (see below):
/// <summary>
/// Handles the NeedDataSource event of the AcceptanceProtocol control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
private
void
AcceptanceProtocol_NeedDataSource(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.Report rep = (Telerik.Reporting.Processing.Report)sender;
this
.DataSource =
this
.BusinessLogic.GetAcceptanceProtocol(
this
.CompanyId,
this
.UserId,
this
.DeviceId,
this
.CultureName,
this
.EventTypeIdFilter,
this
.EventTypeGroupIdFilter);
rep.DataSource =
this
.DataSource;
}
The problem is that sometimes the report is showing data and sometimes not.
If we force a second GET request to the page that renders the report everything is working fine.
Some idea what is causing this?