Page 1 of 1

Unable to refresh data

Posted: Thu Mar 07, 2019 8:27 am
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 4284 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?

Re: Unable to refresh data

Posted: Thu Mar 07, 2019 11:18 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: Unable to refresh data

Posted: Tue Mar 12, 2019 1:19 pm
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

Re: Unable to refresh data

Posted: Tue Mar 12, 2019 4:33 pm
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.

Re: Unable to refresh data

Posted: Wed Mar 13, 2019 11:11 am
by r.bianco
Thank you, it works like a charm ;)

Re: Unable to refresh data

Posted: Thu Mar 14, 2019 8:07 am
by Lech Kulikowski
Hello

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

Thank you.