When I try to take any action in the designer I get the message “Your session has expired!”. At some times it is possible to perform the action, at others the message is returned.
Our team is using the stimulsoft-designer-angular component for online report editing.
These are the versions used:
stimulsoft-designer-angular@2024.3.5
Stimulsoft.Reports.Angular.NetCore@2024.3.5
This is how I configure the designer to display a blank report.
Code: Select all
[Route("api/[controller]")]
public class DesignerController : Controller
{
[HttpGet]
public IActionResult Get(string lang, string data)
{
var requestParams = StiAngularDesigner.GetRequestParams(this);
if (requestParams.Action == StiAction.Undefined)
{
var options = new StiAngularDesignerOptions();
options.Height = Unit.Percentage(100);
options.Dictionary.PermissionDataConnections = StiDesignerPermissions.None;
options.Dictionary.PermissionDataSources = StiDesignerPermissions.View;
options.Dictionary.PermissionDataRelations = StiDesignerPermissions.View;
options.Appearance.Zoom = StiZoomMode.PageWidth;
options.Localization = lang switch
{
"es" => "Localization/es.xml",
"en" => "Localization/en.xml",
_ => "Localization/pt-BR.xml"
};
return StiAngularDesigner.DesignerDataResult(requestParams, options);
}
return StiAngularDesigner.ProcessRequestResult(this);
}
[HttpPost]
public async Task<IActionResult> Post()
{
var requestParams = StiAngularDesigner.GetRequestParams(this);
if (requestParams.ComponentType == StiComponentType.Designer)
switch (requestParams.Action)
{
case StiAction.GetReport: return await GetReport();
//case StiAction.SaveReport: return await SaveReport(identifier, reqData);
}
return StiAngularDesigner.ProcessRequestResult(this);
}
public async Task<IActionResult> GetReport()
{
var report = StiReport.CreateNewReport();
return StiAngularDesigner.GetReportResult(this, report);
}
}