What is requestUrl
-
Kristof170388
- Posts: 1
- Joined: Fri Oct 02, 2026 8:05 am
What is requestUrl
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
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:
Thank you.
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);
}