How do I embed the Report Viewer for Cloud Reporting?
Bold Reports® Cloud provides a built-in RESTful API to embed Report Server reports in your application with the Bold Reporting Tools Report Viewer. To do this, set the serviceAuthorizationToken, serverurl, reportServiceUrl and reportPath properties for the Report Viewer.
What do I need first?
Before you show a report in the Report Viewer, you need:
- An access token for the user. Generate one from the Report Server UI or with the Authentication API.
- The URL of your Cloud Reporting site.
- The path or GUID of a report that is published to your site.
| Report Viewer Property | Value |
|---|---|
| serviceAuthorizationToken |
Pass the access token of the user. Get access token using the Bold Reports® Server Authentication API.
bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InN1 YmhhLnN1a3VtYXJhbkBzeW5jZnVzaW9uLmNvbSIsIm5hbWVpZCI6IjEiLCJ1 bmlxdWVfbmFtZSI6ImM0NWFiZmE0LTBlNjAtNGI4Yy04NWM4LWMxNTBiOGJh MjlkNyIsIklQIjoiOjoxIiwiaXNzdWVkX2RhdGUiOiIxNjMxNzEyOTYzIiwi bmJmIjoxNjMxNzEyOTYzLCJleHAiOjE2MzIzMTc3NjMsImlhdCI6MTYzMTcx Mjk2MywiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo1MTc3OC9yZXBvcnRpbmcv c2l0ZS9zaXRlOTEiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjUxNzc4L3Jl cG9ydGluZy9zaXRlL3NpdGU5MSJ9.d24190nn6i2UNz_8hX1mI0JZTNO9zPX 1HYSlGClkUyw |
| serverurl | Bold Reports® cloud server URL. |
| reportServiceUrl |
Bold Reports® Cloud Service URL.
|
| reportPath |
Path of the report that has been added to the server.
{/category name}/{report name} |
You can also load the report using the Guid instead of report location. Set the Guid of the report in
reportPathas follows:reportPath: ‘91f24bf1-e537-4488-b19f-b37f77481d00’. You can use the Bold Reports® Server’s Get Items API to find the Guid of the report.
For platform-specific steps to embed the Report Viewer, see the following pages:
Frequently asked questions
Which service URL does the Report Viewer use?
Set reportServiceUrl to https://service.boldreports.com/api/Viewer. This is the Cloud Reporting service URL for the Report Viewer.
How do I set the report path?
Set reportPath to /{category name}/{report name}, or to the report’s GUID. Use the Get Items API to find the GUID of a report.
Which platforms can show reports in the Report Viewer?
The Bold Reports® Report Viewer can show your reports in Angular, ASP.NET Core, ASP.NET MVC, ASP.NET Web Forms, JavaScript, React, UWP and WPF applications.