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

Report reload does not work.

5 Answers 146 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
phelix
Top achievements
Rank 1
phelix asked on 10 Sep 2008, 05:39 PM
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

5 Answers, 1 is accepted

Sort by
0
phelix
Top achievements
Rank 1
answered on 10 Sep 2008, 08:36 PM
Never mind. It is because the reportviewer is in an updatepanel.
thanks
0
Steve
Telerik team
answered on 11 Sep 2008, 08:24 AM
Hello phelix,

MS AJAX and our own RadAjax are both supported since v.Q2 2008 of Telerik Reporting. So if you have any problems, please make sure that you are using the latest version and that the updatePanels and triggers are setup properly.

Sincerely yours,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
phelix
Top achievements
Rank 1
answered on 11 Sep 2008, 04:02 PM
I have an image button outside my update panel, my update panel contains the reportviewer. 

and two problems: (Our telerik reporting version is Q1 2008.)

1. I have to use <asp:PostBackTrigger to re-load the report, if I use <asp:AsyncPostBackTrigger then the report will redraw with blank (no data shown at all).
2. with <asp:PostBackTrigger the progress does not show when the report is re-loading.  (not sure this is MS ajax problem or telerik's)

Code snippet:

<asp:ImageButton runat="server" ID="btnRefreshReport" CssClass="imageButton"  ImageUrl="~/Images/refresh.gif"
    OnClick="ButtonRefreshReport_OnClick" />

<asp:UpdateProgress ID="upProgress" runat="server" DynamicLayout="false">
           <ProgressTemplate>
               <img id="Img1" runat="server" src="~/Images/loading_blue.gif" alt="loading..." />
           </ProgressTemplate>
        </asp:UpdateProgress>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<telerik:ReportViewer ID="ReportViewer1" runat="server" BackColor="#CCFFCC"
        Width="100%" Height="500px" />
</ContentTemplate>
<Triggers>
    <asp:PostBackTrigger ControlID="btnRefreshReport" />
</Triggers>
</asp:UpdatePanel>



0
Accepted
Steve
Telerik team
answered on 12 Sep 2008, 09:10 AM
Hi phelix,

As I've stressed in my previous reply - MS AJAX is supported since v.Q2 2008 of Telerik Reporting. So in order for our web ReportViewer to work correctly in ajax context, you need to have at least v.Q2 or later.

Regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
phelix
Top achievements
Rank 1
answered on 12 Sep 2008, 04:59 PM
Thank you, steve.
I upgrade to Q2 Sp1 2008  and it worked.

again thanks

Tags
General Discussions
Asked by
phelix
Top achievements
Rank 1
Answers by
phelix
Top achievements
Rank 1
Steve
Telerik team
Share this question
or