By using the following three different formats, you can give the path of the dashboard file to the Dashboard Viewer:
Refer to the following code snippet:
Refer to the following code snippet:
For example, the web service has the following code snippet to download the Dashboard file:
And, refer to the code snippet of the Dashboard Viewer side as follows:
|
This page will automatically be redirected to the sign-in page in 10 seconds.
Hi, I get has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
how do I solve this?
Hi Bennie,
We can reproduce the reported problem in our end when using the serviceUrl in "http". Please modify the serviceUrl and dashboardPath in "https" format. Also we have modified the serviceUrl and dashboardPath in this KB documentation.
Refer the below example code in the place of Dashboard Viewer instance creation in your application.
$("#dashboard").ejDashboardViewer({
serviceUrl: 'https://dashboardsdkdemo.syncfusion.com/DashboardService/DashboardService.svc',
dashboardPath: 'https://dashboardsdkdemo.syncfusion.com//Dashboards//Northwind Products and Suppliers.sydx' // Public link, which should download the dashboard file at given Dashboard Service URL.
});
Hi Bennie,
Sorry for the inconvenience,
Use below modifed serviceUrl and dashboardPath link instead of previous update.
Refer the below example code in the place of Dashboard Viewer instance creation in your application.
$("#dashboard").ejDashboardViewer({
serviceUrl: 'https://dashboardsdk.syncfusion.com/DashboardService/DashboardService.svc',
dashboardPath: 'https://dashboardsdk.syncfusion.com//Dashboards//Northwind Products and Suppliers.sydx' // Public link, which should download the dashboard file at given Dashboard Service URL.
});