A dashboard can be printed or exported straight to the HTTP response — no viewer needed. Each action loads the dashboard and returns it in the chosen format.

Load the dashboard, then respond in a format.
private StiReport GetDashboard()
{
    var report = StiReport.CreateNewDashboard();
    report.Load(StiNetCoreHelper.MapPath(this, "Dashboards/DashboardChristmas.mrt"));
    return report;
}

public IActionResult ExportPdf()   => StiNetCoreReportResponse.ResponseAsPdf(GetDashboard());
public IActionResult ExportExcel() => StiNetCoreReportResponse.ResponseAsExcel2007(GetDashboard());
public IActionResult PrintPdf()    => StiNetCoreReportResponse.PrintAsPdf(GetDashboard());

How it works. The prepared dashboard is format-agnostic, so each controller action just picks how to serialize the same document.

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.