Using Report Variables in Code
Our sample projects and report templates can help you learn the basics of working with our products.Report variables receive values from the Blazor UI; assign them by name on a copy of the report, then re-render.
Set a variable and re-render.
How it works. The value entered in the input box is bound into the report before rendering, so the viewer immediately shows the updated result.
Set a variable and re-render.
var report = Report.Clone() as StiReport;
report["MySuperUselessVariable"] = NewValueInput;
report.Render();
Report = report;- The indexer
report["Name"]reads and writes report variables by name. Clone()keeps the original template intact;Render()regenerates the document with the new value.
How it works. The value entered in the input box is bound into the report before rendering, so the viewer immediately shows the updated result.