This is a migrated thread and some comments may be shown as answers.

Page Postback everytime while generating report (ReportViewr is in AjaxPanel)

3 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 12 Nov 2010, 08:46 PM
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>

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 18 Nov 2010, 02:45 PM
Hello Jay,

The ReportViewer has its own Loading Image that is shown when a report is being generated and you do not need to create your own. You can see this behavior in our examples e.g. Report Book demo report.

Best wishes,
Steve
the Telerik team
See What's New in Telerik Reporting in Q3 2010 on Wednesday, November 17, 11am Eastern Time: Register here>>
0
Jay
Top achievements
Rank 1
answered on 18 Nov 2010, 10:23 PM
Thank you for reply. We were able to do it after Q3 upgrade. For some reason it is not working with Q2.
0
Steve
Telerik team
answered on 19 Nov 2010, 09:03 AM
Hi Jay,

Indeed there was a problem with the loading panel in the Q2 SP1 release, which we addressed in Q3.

Sorry for the confusion that this caused.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Jay
Top achievements
Rank 1
Answers by
Steve
Telerik team
Jay
Top achievements
Rank 1
Share this question
or