I can load the report viewer in react following this guide:
https://docs.telerik.com/reporting/knowledge-base/how-to-use-html5-viewer-in-react-js
But when I add react route, it failed when there is any input parameter.
<Route path="/test" component={ReportViewerFunction} /> // success
<Route path="/test2/:name" component={ReportViewerFunction} /> //show TypeError: window.jQuery(...).telerik_ReportViewer is not a function
And then I found this document, says that:
Such error can occur if:
jQuery is not loaded;
jQuery is loaded more than once and with different version;
jQuery is loaded at later stage in the page life cycle.
https://docs.telerik.com/reporting/knowledge-base/getting-telerik-reportviewer-is-not-a-function-console-error
I do not know how to fix this problem. Is there a better way to implement the report viewer in React?
Also I would like to know how to direct print the report, instead of every time preview the report before printing.