Report variables let a web report receive values from the request — form input or query string — assigned by name before rendering.

Read form values and assign variables.
var report = new StiReport();
report.Load(StiNetCoreHelper.MapPath(this, "Reports/Variables.mrt"));
report.Compile();

var formValues = StiNetCoreViewer.GetFormValues(this);
report["Name"]    = formValues["name"] ?? string.Empty;
report["Email"]   = formValues["email"] ?? string.Empty;
report["Sex"]     = formValues["sex"] != null && Convert.ToBoolean(formValues["sex"]);

return StiNetCoreViewer.GetReportResult(this, report);

How it works. User input flows from the request into the report's variables, so the rendered document reflects exactly what was submitted.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.