Images of report are not displaying and not saving as PDF

Stimulsoft Reports.WEB discussion
Post Reply
cherou
Posts: 9
Joined: Wed Mar 22, 2017 10:03 am

Images of report are not displaying and not saving as PDF

Post by cherou »

I have written the following code as .cshtml using Visual Studio from the beginning of using Stimulsoft. In old versions i was using CacheMode=ObjectSession. Ιn version 2019.2.1 there was the error 'Object reference not set to an instance of an object' at Stimulsoft.Report.Web.StiCacheHelper.SaveObject(Object obj, String guid, StiServerCacheMode cacheMode, TimeSpan timeout, CacheItemPriority priority). So, i changed it as CacheMode=StringCache and I solved the problem.

Now i am using the last version 2019.3.6.
In preview, when CacheMode=StringCache, then if i have more than one pages and images on each page, the images of 1st page are displaying, but when i select next pages, the images are not displaying. I am returning to 1st page and images of 1st page have been lost!!!
Also, when i save as PDF, my images are not displaying.
When I changed again CacheMode=ObjectSession, then all images are displaying but i have again the same error 'Object reference not set to an instance of an object' at Stimulsoft.Report.Web.StiCacheHelper.SaveObject(Object obj, String guid, StiServerCacheMode cacheMode, TimeSpan timeout, CacheItemPriority priority).

I need immediately a solution. i can't send you a sample because my reports are built with code dynamically.

@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
{
Server =
{
RequestTimeout = 300, // 5 minutes
CacheTimeout = 3, //10, // 10 MINUTES
CacheMode = Stimulsoft.Report.Web.StiServerCacheMode.ObjectSession, // old versions
CacheMode = Stimulsoft.Report.Web.StiServerCacheMode.StringCache, // version 2019.2.1
},

})
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Images of report are not displaying and not saving as PDF

Post by Lech Kulikowski »

Hello,

We couldn't reproduce the issue on our samples.
Please send us a sample project which reproduces the issue for analysis.

Thank you.
cherou
Posts: 9
Joined: Wed Mar 22, 2017 10:03 am

Re: Images of report are not displaying and not saving as PDF

Post by cherou »

My reports have the property Report Cache Mode as Off. May i turn it on?
cherou
Posts: 9
Joined: Wed Mar 22, 2017 10:03 am

Re: Images of report are not displaying and not saving as PDF

Post by cherou »

On Azure this error. It's yours.

Type : System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : Stimulsoft.Report.Web
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void SaveObject(System.Object, System.String)
HResult : -2147467261
Stack Trace : at Stimulsoft.Report.Web.StiCacheHelper.SaveObject(Object obj, String guid) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Web\Helpers\StiCacheHelper.cs:line 152
at Stimulsoft.Report.Web.StiCacheHelper.SaveObject(Object obj, String guid, StiServerCacheMode cacheMode, TimeSpan timeout, CacheItemPriority priority) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Web\Helpers\StiCacheHelper.cs:line 727
at Stimulsoft.Report.Web.StiCacheHelper.SaveReport(StiReport report, String guid) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Web\Helpers\StiCacheHelper.cs:line 199
at Stimulsoft.Report.Web.StiCacheHelper.SaveReport(StiReport report, String guid, StiServerCacheMode cacheMode, TimeSpan timeout, CacheItemPriority priority) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Web\Helpers\StiCacheHelper.cs:line 748
at Stimulsoft.Report.Web.StiCacheHelper.SaveReportInternal(StiRequestParams requestParams, StiReport report) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Web\Helpers\StiCacheHelper.cs:line 422
at Stimulsoft.Report.Mvc.StiMvcViewer.GetReportResult(StiRequestParams requestParams, StiReport report) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Mvc\Viewer\StiMvcViewer.Actions.cs:line 69
at Epafos.ePortfolio.UIL.Controllers.RptsController.GetReportSnapshot(Nullable`1 id) in C:\LocalSSF\ePortfolio\Implementation\Solution\trunk\epafos.ePortfolio.UIL.Member\Controllers\Reports\RptsController.cs:line 675
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Images of report are not displaying and not saving as PDF

Post by Lech Kulikowski »

Hello,

We couldn't reproduce the issue on our samples.
Please send us a sample project which reproduces the issue for analysis.

Thank you.
Post Reply