Unable to refresh data

Stimulsoft Dashboards.WEB discussion
Post Reply
r.bianco
Posts: 75
Joined: Thu Oct 27, 2016 2:06 pm

Unable to refresh data

Post by r.bianco »

Hello,
using MSSQL connection, I added new records while looking at the dashboard.

I noticed that dashboards seem to cache data, clicking the refresh icon on the top bar on preview doesn't load new records and the only way to show the new records is to open the design view and syncronize the data source.

These are the main settings
dash_cache.PNG
dash_cache.PNG (16.79 KiB) Viewed 3053 times
as you can see both the cache data and totals are set to false and the report cache mode is set to off too.
Is there some other setting to change?
Soft System srl
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Unable to refresh data

Post by Lech Kulikowski »

Hello,

Please try to add the following code:
Stimulsoft.Report.Dashboard.StiCacheCleaner.clean();

Thank you.
r.bianco
Posts: 75
Joined: Thu Oct 27, 2016 2:06 pm

Re: Unable to refresh data

Post by r.bianco »

Thank you, Lech
The command works fine, I tried it in the Page_Load, and reopening the page loads the new data.
Is it possible to bind it to the refresh button? I didn't find a suitable event for StiWebViewer
Soft System srl
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Unable to refresh data

Post by Lech Kulikowski »

Hello,

You can add Clean() method in the StiWebViewer1_GetReport
and add the following code:

Code: Select all

    <cc1:StiWebViewer ID="StiWebViewer1" runat="server"
            OnGetReport="StiWebViewer1_GetReport" />



    <script>
        jsStiWebViewer1.controls.buttons.RefreshDashboard.action = function () {
            this.jsObject.postAction("GetReport");
        };
    </script>
Thank you.
r.bianco
Posts: 75
Joined: Thu Oct 27, 2016 2:06 pm

Re: Unable to refresh data

Post by r.bianco »

Thank you, it works like a charm ;)
Soft System srl
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Unable to refresh data

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply