Stimulsoft Web Designer does not reflect Band Alias updated at runtime on server side

Stimulsoft Reports.WEB discussion
Post Reply
rooseveltdossantos
Posts: 3
Joined: Mon Dec 15, 2025 12:35 pm

Stimulsoft Web Designer does not reflect Band Alias updated at runtime on server side

Post by rooseveltdossantos »

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);
}
Lech Kulikowski
Posts: 7627
Joined: Tue Mar 20, 2018 5:34 am

Re: Stimulsoft Web Designer does not reflect Band Alias updated at runtime on server side

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
rooseveltdossantos
Posts: 3
Joined: Mon Dec 15, 2025 12:35 pm

Re: Stimulsoft Web Designer does not reflect Band Alias updated at runtime on server side

Post by rooseveltdossantos »

Before sending the report to the project, I need to localize/translate the title of a band to pt-BR, as highlighted in the attached image.

Thank you.
Attachments
Screenshot_3.png
Screenshot_3.png (217.5 KiB) Viewed 90 times
Lech Kulikowski
Posts: 7627
Joined: Tue Mar 20, 2018 5:34 am

Re: Stimulsoft Web Designer does not reflect Band Alias updated at runtime on server side

Post by Lech Kulikowski »

Hello,

> Before sending the report to the project, I need to localize/translate the title of a band to pt-BR, as highlighted in the attached image.

Sorry, we did not exactly understand your question. Could you explain your issue in more detail?

Thank you.
Post Reply