Page 1 of 1
Changing pages results in all blank data
Posted: Tue Jul 07, 2020 11:45 am
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?
Re: Changing pages results in all blank data
Posted: Tue Jul 07, 2020 12:21 pm
by nbelley
Re: Changing pages results in all blank data
Posted: Tue Jul 07, 2020 2:11 pm
by nbelley
Just to add to the errors, just changing the zoom also clears the data?!? Please help!
Re: Changing pages results in all blank data
Posted: Tue Jul 07, 2020 2:53 pm
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);
}
}
Re: Changing pages results in all blank data
Posted: Tue Jul 07, 2020 9:28 pm
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.
Re: Changing pages results in all blank data
Posted: Wed Jul 08, 2020 12:07 am
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?
Re: Changing pages results in all blank data
Posted: Wed Jul 08, 2020 1:19 pm
by nbelley
And also, zooming causes this, you're telling me caching is the issue?!?
Re: Changing pages results in all blank data
Posted: Wed Jul 08, 2020 2:51 pm
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!!!
Re: Changing pages results in all blank data
Posted: Thu Jul 09, 2020 8:03 am
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.