Stimulsoft Web Designer does not reflect Band Alias updated at runtime on server side
Posted: Thu Jan 29, 2026 9:00 pm
Hello,
I am using Stimulsoft.Report.WebDesign.NetCore and I need to set the Alias of some bands at runtime inside a controller Action.
I can see that the Alias property is correctly updated on the server side and its value is preserved between calls to the controller Actions. However, the Web Designer UI does not reflect this change — the updated Alias does not appear either on the band itself or in the Properties grid.
The code below shows how I am setting the Alias on the server side.
After the call to the DesignerEvent Action, how can I force or trigger the Designer to refresh and display the updated Alias value?
Is there any API or event that should be called to synchronize server-side changes with the Web Designer UI?
Thank you in advance for your help.
public IActionResult DesignerEvent()
{
// Deixa o Stimulsoft processar PRIMEIRO
var result = StiNetCoreDesigner.DesignerEventResult(this);
// DEPOIS do processamento, atualiza os aliases
var requestParams = StiNetCoreDesigner.GetRequestParams(this);
if (requestParams.Action == StiAction.RunCommand)
{
// Obtém o relatório que JÁ FOI MODIFICADO pelo Stimulsoft
var report = StiNetCoreDesigner.GetReportObject(this);
if (report != null)
{
// Atualiza TODOS os aliases vazios com nomes localizados
UpdateBandAliases(report);
// Salva de volta no cache
SaveReportToCache(requestParams.Cache.ClientGuid, report);
}
}
return result;
}
private void UpdateBandAliases(StiReport report)
{
// Configura para usar aliases
report.Designer ??= new Stimulsoft.Report.Web.StiWebDesignerBase();
report.Designer.UseAliases = true;
// Percorre TODOS os componentes
foreach (StiComponent comp in report.GetComponents())
{
// Só atualiza bandas SEM alias definido
if (comp is StiBand band && string.IsNullOrWhiteSpace(band.Alias))
{
band.Alias = band.LocalizedName;
_logger.LogInformation(
"Alias atualizado: {BandName} -> {Alias}",
band.Name,
band.Alias
);
}
}
}
private void SaveReportToCache(string clientGuid, StiReport report)
{
var cacheKey = $"{DesignerComponentId}_{clientGuid}_template";
var cacheHelper = StiNetCoreDesigner.CacheHelper;
cacheHelper.HttpContext = new Stimulsoft.System.Web.HttpContext(HttpContext);
cacheHelper.CacheMode = StiServerCacheMode.StringCache;
cacheHelper.Timeout = TimeSpan.FromMinutes(30);
cacheHelper.Priority = Stimulsoft.System.Web.Caching.CacheItemPriority.Default;
cacheHelper.SaveReport(report, cacheKey);
_logger.LogInformation("Relatório salvo no cache: {CacheKey}", cacheKey);
}
I am using Stimulsoft.Report.WebDesign.NetCore and I need to set the Alias of some bands at runtime inside a controller Action.
I can see that the Alias property is correctly updated on the server side and its value is preserved between calls to the controller Actions. However, the Web Designer UI does not reflect this change — the updated Alias does not appear either on the band itself or in the Properties grid.
The code below shows how I am setting the Alias on the server side.
After the call to the DesignerEvent Action, how can I force or trigger the Designer to refresh and display the updated Alias value?
Is there any API or event that should be called to synchronize server-side changes with the Web Designer UI?
Thank you in advance for your help.
public IActionResult DesignerEvent()
{
// Deixa o Stimulsoft processar PRIMEIRO
var result = StiNetCoreDesigner.DesignerEventResult(this);
// DEPOIS do processamento, atualiza os aliases
var requestParams = StiNetCoreDesigner.GetRequestParams(this);
if (requestParams.Action == StiAction.RunCommand)
{
// Obtém o relatório que JÁ FOI MODIFICADO pelo Stimulsoft
var report = StiNetCoreDesigner.GetReportObject(this);
if (report != null)
{
// Atualiza TODOS os aliases vazios com nomes localizados
UpdateBandAliases(report);
// Salva de volta no cache
SaveReportToCache(requestParams.Cache.ClientGuid, report);
}
}
return result;
}
private void UpdateBandAliases(StiReport report)
{
// Configura para usar aliases
report.Designer ??= new Stimulsoft.Report.Web.StiWebDesignerBase();
report.Designer.UseAliases = true;
// Percorre TODOS os componentes
foreach (StiComponent comp in report.GetComponents())
{
// Só atualiza bandas SEM alias definido
if (comp is StiBand band && string.IsNullOrWhiteSpace(band.Alias))
{
band.Alias = band.LocalizedName;
_logger.LogInformation(
"Alias atualizado: {BandName} -> {Alias}",
band.Name,
band.Alias
);
}
}
}
private void SaveReportToCache(string clientGuid, StiReport report)
{
var cacheKey = $"{DesignerComponentId}_{clientGuid}_template";
var cacheHelper = StiNetCoreDesigner.CacheHelper;
cacheHelper.HttpContext = new Stimulsoft.System.Web.HttpContext(HttpContext);
cacheHelper.CacheMode = StiServerCacheMode.StringCache;
cacheHelper.Timeout = TimeSpan.FromMinutes(30);
cacheHelper.Priority = Stimulsoft.System.Web.Caching.CacheItemPriority.Default;
cacheHelper.SaveReport(report, cacheKey);
_logger.LogInformation("Relatório salvo no cache: {CacheKey}", cacheKey);
}