Dashboard shows blank data when using StringCache and external data

Stimulsoft Reports.NET discussion
Post Reply
emanuelv
Posts: 20
Joined: Fri Sep 13, 2019 5:46 pm

Dashboard shows blank data when using StringCache and external data

Post by emanuelv »

Hello,

I hope everyone is doing well. There seems to be an issue when trying to use StringCache along with dashboard data from an external file. For example, I create a dashboard and register the data from an external file like this:

Code: Select all

//Clear database to ensure data comes from external file and not data embedded in the report.
report.Dictionary.Databases.Clear();

var dssummary = Stimulsoft.Base.StiJsonToDataSetConverter.GetDataSetFromFile(StiNetCoreHelper.MapPath(this, "Data/summary.json"));
report.RegData("summary", dssummary);
Then in the Get() method of ViewerController, I use StringCache like this:

Code: Select all

options.Server.CacheMode = StiServerCacheMode.StringCache;
When I run the server, the dashboard loads, but all of the data is blank. If I use ObjectCache, everything works. I was able to reproduce this using the Stimulsoft Summary Sales Dashboard demo (https://demo.stimulsoft.com/#Net/DashboardSummary). I generated a json file from the Excel file used as the data resource in the report. In the ViewerController, I loaded this json file. Everything works normally. However, once I just change the cache mode to StringCache, then the dashboard comes back with blank data. I'm attaching a zip file of the exported demo dashboard along with the json data and the modified ViewerController which is set to StringCache. The only changes to the published demo are clearing the report's database before loading in the external data file (if I don't do this, it will use the data embedded in the report and not the external file. I know because if I change the data in the external file, it's not reflected in the dashboard unless I clear the report's databases first in the code before I load the external file), and changing the cache mode to StringCache. If you change it back to ObjectCache and re-run it, it will work again. For our purposes, we would need to use StringCache since we use a database for caching, and external files/data since we would use the same report for multiple scenarios. If I only use the data embedded in the report, StringCache works. But if I clear the databases and load in external data, StringCache does not seem to work for dashboards.

Any help would be appreciated!
Thanks!
Attachments
Show-DashboardSummary-NetCore-Pack.zip
(1.95 MiB) Downloaded 105 times
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: Dashboard shows blank data when using StringCache and external data

Post by Lech Kulikowski »

Hello,

We need additional time to investigate the issue.

Thank you.
Post Reply