Changing pages results in all blank data

Stimulsoft Reports.WEB discussion
Post Reply
nbelley
Posts: 9
Joined: Thu Jul 02, 2020 11:24 am

Changing pages results in all blank data

Post by nbelley »

I'm using MVC viewer in a partial view, loaded in ajax.

The page counts of the report is OK in the page navigator on the viewer when the reports renders, and the first page is always good. But when I click « next page » on the viewer, it's blank. Even if I come back to the first page, which was OK on first load, is now empty, any ideas?
nbelley
Posts: 9
Joined: Thu Jul 02, 2020 11:24 am

Re: Changing pages results in all blank data

Post by nbelley »

Here is the details in screenshots:

Image

Image

Image

Image

Image
nbelley
Posts: 9
Joined: Thu Jul 02, 2020 11:24 am

Re: Changing pages results in all blank data

Post by nbelley »

Just to add to the errors, just changing the zoom also clears the data?!? Please help!
nbelley
Posts: 9
Joined: Thu Jul 02, 2020 11:24 am

Re: Changing pages results in all blank data

Post by nbelley »

MVC page code:

Code: Select all

@model WorkShiftTimeReportViewModel

@using Stimulsoft.Report.Web;
@using Stimulsoft.Report.Mvc;

@{
    ViewBag.Title = Resources.BreadCrumb_WorkShiftTimeReport;
    var localization = $"~/Localization/fr.xml";
}

@Html.Stimulsoft().StiMvcViewer("xReportViewer", new StiMvcViewerOptions()
{    
    Server =
    {        
        PassFormValues = true,
    },
    Localization = localization,
    Appearance =
    {
        FullScreenMode = false
    },
    Toolbar =
    {
        DisplayMode = StiToolbarDisplayMode.Simple,
    },
    Actions =
    {
        GetReport = "GetWorkShiftTimeReport",
        Interaction = "ViewerInteraction",
        ViewerEvent = "ViewerEvent"
    }
})
Controller code:

Code: Select all


        public ActionResult GetWorkShiftTimeReport()
        {
            var reportPath = Server.MapPath("~/Content/Reports/WorkShiftUserTimeReport.mrt");

            var startDate = DateTime.Parse(Request["StartDate"], DisplayHelper.CurrentUserCultureInfo);
            var endDate = DateTime.Parse(Request["EndDate"], DisplayHelper.CurrentUserCultureInfo);
            var userName = Request["UserName"];

            using (var report = StiReport.CreateNewReport())
            {
                report.Load(reportPath);

                this.CheckReportReference(report);

                report.Compile();

                var wsReport = this.LoadWorkShiftTimeReport(startDate, endDate, userName);
                report.RegBusinessObject("WorkShiftTimeReport", wsReport);
                report.Dictionary.SynchronizeBusinessObjects(10);

                return StiMvcViewer.GetReportResult(report);
            }
        }
Lech Kulikowski
Posts: 6265
Joined: Tue Mar 20, 2018 5:34 am

Re: Changing pages results in all blank data

Post by Lech Kulikowski »

Hello,

Most probably, the issue with caching. Please check the following article:
https://www.stimulsoft.com/en/documenta ... ashing.htm

Thank you.
nbelley
Posts: 9
Joined: Thu Jul 02, 2020 11:24 am

Re: Changing pages results in all blank data

Post by nbelley »

So, you're telling me that the reports has all the data, since it knows how many pages to render, but just changing the page makes it lose the data?
nbelley
Posts: 9
Joined: Thu Jul 02, 2020 11:24 am

Re: Changing pages results in all blank data

Post by nbelley »

Lech Kulikowski wrote: Tue Jul 07, 2020 9:28 pm Hello,

Most probably, the issue with caching. Please check the following article:
https://www.stimulsoft.com/en/documenta ... ashing.htm

Thank you.
And also, zooming causes this, you're telling me caching is the issue?!?
nbelley
Posts: 9
Joined: Thu Jul 02, 2020 11:24 am

Re: Changing pages results in all blank data

Post by nbelley »

I just looked at the doc, it says:
The HTML5 Viewer component allows you to use the server cache to store rendered reports. If you do not use caching, then, every time you request a page, you should load the report, connect data, and render it again. If you use caching, every time you refresh the page, the previously rendered report will be loaded from the cache.
This is what I'm doing, I don't need the cache!!!
Lech Kulikowski
Posts: 6265
Joined: Tue Mar 20, 2018 5:34 am

Re: Changing pages results in all blank data

Post by Lech Kulikowski »

Hello,

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

Thank you.
Post Reply