Hi,
I am facing a problem while generating a report.
when i click on "generate report" button, report is generated as i wanted. but i want to show the LoadingPanelImage while Report is being generated. I have put reportviewr and other controls in ajax panel.
Problem is When i click on the "Generate Report" button it shows the loading panel for a while and then page is being post back.
Help me to get out of this.
Code:
protected void btnReport_Click(object sender, EventArgs e)
{
DetailReport rpt = new DetailReport();
DateTime dtFromDate = Convert.ToDateTime(txtFromDate.SelectedDate);
DateTime dtToDate = Convert.ToDateTime(txtToDate.SelectedDate).AddHours(23.00).AddMinutes(59.00).AddSeconds(59);
rpt.ReportParameters["Interview"].Value = Convert.ToInt32(ddlInterview.SelectedItem.Value);
rpt.ReportParameters["Facility"].Value = Convert.ToInt32(ddlFacility.SelectedItem.Value);
rpt.ReportParameters["FromDate"].Value = dtFromDate;
rpt.ReportParameters["ToDate"].Value = dtToDate;
if (txtCautionArea.Text != "")
{
rpt.ReportParameters["CautionArea"].Value = Convert.ToInt32(txtCautionArea.Text);
}
else
{
rpt.ReportParameters["CautionArea"].Value = 0;
}
//ReportViewer1.RefreshReport();
ReportViewer1.Report = rpt;
}
aspx:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnReport">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ReportViewer1" LoadingPanelID="RadAjaxLoadingPanel1"
UpdatePanelHeight="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
I am facing a problem while generating a report.
when i click on "generate report" button, report is generated as i wanted. but i want to show the LoadingPanelImage while Report is being generated. I have put reportviewr and other controls in ajax panel.
Problem is When i click on the "Generate Report" button it shows the loading panel for a while and then page is being post back.
Help me to get out of this.
Code:
protected void btnReport_Click(object sender, EventArgs e)
{
DetailReport rpt = new DetailReport();
DateTime dtFromDate = Convert.ToDateTime(txtFromDate.SelectedDate);
DateTime dtToDate = Convert.ToDateTime(txtToDate.SelectedDate).AddHours(23.00).AddMinutes(59.00).AddSeconds(59);
rpt.ReportParameters["Interview"].Value = Convert.ToInt32(ddlInterview.SelectedItem.Value);
rpt.ReportParameters["Facility"].Value = Convert.ToInt32(ddlFacility.SelectedItem.Value);
rpt.ReportParameters["FromDate"].Value = dtFromDate;
rpt.ReportParameters["ToDate"].Value = dtToDate;
if (txtCautionArea.Text != "")
{
rpt.ReportParameters["CautionArea"].Value = Convert.ToInt32(txtCautionArea.Text);
}
else
{
rpt.ReportParameters["CautionArea"].Value = 0;
}
//ReportViewer1.RefreshReport();
ReportViewer1.Report = rpt;
}
aspx:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnReport">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ReportViewer1" LoadingPanelID="RadAjaxLoadingPanel1"
UpdatePanelHeight="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>