https://github.com/cmyksvoll/StimulsoftReportsTest
This works fine when Server CacheMode is set to ObjectCache (default). In my project I need to be able to access the server via a load balancer, so I cannot use caching on the server.
If I try setting CacheMode to None, my report variables are no longer showing (see attached screenshots).
Server code:
Code: Select all
public class ViewerController : Controller
{
[HttpPost]
public IActionResult InitViewer()
{
var requestParams = StiAngularViewer.GetRequestParams(this);
var options = new StiAngularViewerOptions();
options.Actions.ViewerEvent = "ViewerEvent";
options.Server.CacheMode = StiServerCacheMode.None;
return StiAngularViewer.ViewerDataResult(requestParams, options);
}
[HttpPost]
public IActionResult ViewerEvent()
{
var requestParams = StiAngularViewer.GetRequestParams(this);
if (requestParams.Action == StiAction.GetReport)
{
var report = StiReport.CreateNewReport();
var path = StiAngularHelper.MapPath(this, $"Reports/TestReport.mrt");
report.Load(path);
return StiAngularViewer.GetReportResult(this, report);
}
return StiAngularViewer.ProcessRequestResult(this);
}
}