What is requestUrl

Stimulsoft Reports for React discussion
Post Reply
Kristof170388
Posts: 1
Joined: Fri Oct 02, 2026 8:05 am

What is requestUrl

Post 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?
Lech Kulikowski
Posts: 7879
Joined: Tue Mar 20, 2018 5:34 am

Re: What is requestUrl

Post 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.
Post Reply