Page 1 of 1

What is requestUrl

Posted: Fri Oct 02, 2026 8:11 am
by Kristof170388
I installed stimulsoft-viewer-react and copied the viewer example from the first topic. I don't understand what requestUrl="/Viewer/{action}" means, and where the report comes from. Do I need a backend to show it?

Re: What is requestUrl

Posted: Fri Oct 02, 2026 8:21 am
by Lech Kulikowski
Hello,

Yes, the React component is only the client part. It doesn't contain the report engine.
It sends requests to requestUrl, replacing {action} with the action name (InitViewer, ViewerEvent, and so on).
Your ASP.NET Core server, with the Stimulsoft.Reports.React NuGet package, handles them.

The report is chosen on the server, in the GetReport action:

Code: Select all

public IActionResult GetReport()
{
    var report = StiReport.CreateNewReport();
    report.Load(StiReactHelper.MapPath(this, "Reports/MasterDetail.mrt"));
    return StiReactViewer.GetReportResult(this, report);
}
Thank you.