We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon
If you became a customer of the Syncfusion Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion for your reporting needs.

Create Report with object send from my web portal

Hello to everyone, I'm starting to use the server report, I've already installed everything on my server, now I wanted to start creating a report and get it running.
But I came across some issues:

1) I have a multi-tenant portal, for every tenant I have a database. I would like to create a standard report for all tenants, can I send an object to the report server to see it in the report?

2) How can I from my portal (angular 4) to send the oject to print reports server?

9 Replies

RR Rajesh Rajendiran Syncfusion Team July 12, 2017 12:45 PM UTC

Hi Bruno,  
 
Thanks for using Syncfusion Products. 
 
Please find our responses below for your queries. 
 
1) I have a multi-tenant portal, for every tenant I have a database. I would like to create a standard report for all tenants, can I send an object to the report server to see it in the report? 
 
 
 
1.       You can dynamically change the database name in datasource connection string based on user using ReportParameter expression in connection string. We must have tables with same schema in all databases which is used in the dataset query. If you having different table with different schema then it will shows error in data retrieval. If your requirement is to change the database and dataset based on the user then for every tenant then you have to dynamically create report in code behind to render user based reports.  
 
2.       Please refer the following KB to dynamically edit a report at run time.  
 
2) How can I from my portal (angular 4) to send the oject to print reports server? 
 
This can be achieved using our public API. By calling below specified API, you will be able print your report on specified format. 
“reportserverurl/api/reports/export” 
 
Also, you can export your report in following types, 
1.       Image, 
2.       Word, 
3.       Html, 
4.       PDF, 
5.       Excel 
     
API Code Snippet: 
 
Token Generation: 
To generate token please follow the below help link 
 
Item Request: 
Item request will ask you which report you want export and what type. 
 
Item Response: 
Exported report will result in bytes and it is available in object “filecontent” . 
 
 
 
 
 
 
 
Thanks, 
Rajesh. R 



BR Bruno July 12, 2017 12:50 PM UTC

Token Generation: 
To generate token please follow the below help link 
https://help.syncfusion.com/report-platform/report-server/api/v1.0/#tag/Authentication 

grant_type -> What do you mean? What should I enter?


RR Rajesh Rajendiran Syncfusion Team July 12, 2017 01:03 PM UTC

Hi Bruno, 

grant_type is a string property and you should set “password” as value to it. We have implemented OAuth for API and used password grant type. 

Thanks, 
Rajesh. R 



BR Bruno replied to Rajesh Rajendiran July 12, 2017 01:16 PM UTC

Hi Bruno, 

grant_type is a string property and you should set “password” as value to it. We have implemented OAuth for API and used password grant type. 

Thanks, 
Rajesh. R 


I tried to set grant_type to "password" but it does not work i will return error 400


POST

report.mysedna.com/api/token


body by from data

usarname : "pippo"

password : "pippo"

grant_type:"password"


return 400

unsupported_grant_type





RR Rajesh Rajendiran Syncfusion Team July 13, 2017 01:02 PM UTC

Hi Bruno, 

We have tried to generate token form your site(http://report.mysedna.com/api/token) given in the previous update. 

But we were unable to get token for the user having username: "pippo" and password: "pippo". From the error, it seems that the username of the user is wrong. 

Also we found some error in previous update that given by you.  

The error we found, Instead "username" you had given "usarname". 
Please refer the below screenshot. 
 

Token generation in your site(http://report.mysedna.com/api/token): 
Throws error while generating token through your site. 

 

Token generation in our demo site(http://reportserver.syncfusion.com/api/token): 

We can able to generate token by calling our report server demo site http://reportserver.syncfusion.com/api/token
Please refer the below screenshot. 

 

 
Thanks, 
Rajesh. R 



BR Bruno July 13, 2017 01:14 PM UTC

Thanks, now it works, I was wrong because I passed the data as form-date and not x-www-form-urlencoded.


But through API, can i create categories in reportserver?



RR Rajesh Rajendiran Syncfusion Team July 14, 2017 09:54 AM UTC

Hi Bruno, 

Yes, you can create categories in Report Server through this API “reportserverurl /api/v2.0/categories”  . 
 
Please refer the below online help documentation link for this.  


Thanks, 
Rajesh. R 



BR Bruno replied to Rajesh Rajendiran July 15, 2017 08:08 AM UTC

Hi Bruno,  
 
Thanks for using Syncfusion Products. 
 
Please find our responses below for your queries. 
 
1) I have a multi-tenant portal, for every tenant I have a database. I would like to create a standard report for all tenants, can I send an object to the report server to see it in the report? 
 
 
 
1.       You can dynamically change the database name in datasource connection string based on user using ReportParameter expression in connection string. We must have tables with same schema in all databases which is used in the dataset query. If you having different table with different schema then it will shows error in data retrieval. If your requirement is to change the database and dataset based on the user then for every tenant then you have to dynamically create report in code behind to render user based reports.  
 
2.       Please refer the following KB to dynamically edit a report at run time.  
 
2) How can I from my portal (angular 4) to send the oject to print reports server? 
 
This can be achieved using our public API. By calling below specified API, you will be able print your report on specified format. 
“reportserverurl/api/reports/export” 
 
Also, you can export your report in following types, 
1.       Image, 
2.       Word, 
3.       Html, 
4.       PDF, 
5.       Excel 
     
API Code Snippet: 
 
Token Generation: 
To generate token please follow the below help link 
 
Item Request: 
Item request will ask you which report you want export and what type. 
 
Item Response: 
Exported report will result in bytes and it is available in object “filecontent” . 
 
 
 
 
 
 
 
Thanks, 
Rajesh. R 


Where can I get the GUID of the report?



BR Bruno July 17, 2017 08:02 AM UTC

 You can dynamically change the database name in datasource connection string based on user using ReportParameter expression in connection string. We must have tables with same schema in all databases which is used in the dataset query.

This is my case every tenant's databases have the same identical schema but I could not find the documentation to be able to dynamically change the connection string. its possible an example

Loader.
Live Chat Icon For mobile
Up arrow icon