How to refresh Webviewer without reloading page

Stimulsoft Reports.WEB discussion
Post Reply
jaimefuhr
Posts: 8
Joined: Wed Sep 15, 2021 5:10 pm

How to refresh Webviewer without reloading page

Post by jaimefuhr »

I am using version 2022.1.2 .NETFrame 4.5.2.

I am attempting to use the following code but it will not refresh the WebViewer control. If the UpdatePanels are removed, the WebViewer will refresh the report. How can I do this without causing the entire page to reload?

I found a post from 2009 that says the webviewer "It has the algorithms for work without reload of pages." but I can't get this to work. How to you reload the webviewer?

Code: Select all

<asp:UpdatePanel runat="server" id="UPActions">
    <ContentTemplate>
    <label class="form-label">Status</label>
<asp:DropDownList ID="status" runat="server" CssClass="form-select"></asp:DropDownList>
 <asp:Button ID="submit" runat="server" CssClass="btn btn-primary" Text="Run Report" OnClick="submit_Click" />
    </ContentTemplate>
</asp:UpdatePanel>

<cc1:StiWebViewer ID="reportViewer" runat="server"></cc1:StiWebViewer>
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to refresh Webviewer without reloading page

Post by Lech Kulikowski »

Hello,

Please try to use the RefreshTime property of the report.

Thank you.
jaimefuhr
Posts: 8
Joined: Wed Sep 15, 2021 5:10 pm

Re: How to refresh Webviewer without reloading page

Post by jaimefuhr »

Unfortunately, it did not work. I could see the indicator that the report was refreshing but the data did not update.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to refresh Webviewer without reloading page

Post by Lech Kulikowski »

Hello,

How do you register data in for your report?

Also, you can use the OnViewerEvent to update data in your report.

Thank you.
abshiregabrielle
Posts: 1
Joined: Thu Dec 07, 2023 2:18 am

Re: How to refresh Webviewer without reloading page

Post by abshiregabrielle »

It was a failure, regrettably. There was a refresh indicator, but the data remained unchanged in the report.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to refresh Webviewer without reloading page

Post by Lech Kulikowski »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?

Thank you.
Noramila
Posts: 6
Joined: Wed Dec 20, 2023 6:39 am
Location: India

Re: How to refresh Webviewer without reloading page

Post by Noramila »

You can try this trough the JavaScript cade like.

Code: Select all


<script type="text/javascript">
    function refreshWebViewer() {
        var webViewer = document.getElementById('<%= reportViewer.ClientID %>');
        if (webViewer) {
            webViewer.refresh(); 
            }
    }
</script>
And call the

Code: Select all

refreshWebViewer()
function after the actions trigger a change in the UpdatePanel like after the

Code: Select all

submit_Click
event.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: How to refresh Webviewer without reloading page

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Noramila
Posts: 6
Joined: Wed Dec 20, 2023 6:39 am
Location: India

Re: How to refresh Webviewer without reloading page

Post by Noramila »

Lech Kulikowski wrote: Wed Dec 27, 2023 8:06 am Hello,

Thank you for the information.
You are welcome.
Post Reply