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.
Unfortunately, activation email could not send to your email. Please try again.

Create Report with object send from my web portal

Thread ID:

Created:

Updated:

Platform:

Replies:

131470 Jul 11,2017 12:03 PM Jul 17,2017 04:02 AM Report Platform 9
loading
Tags: Report Server
Bruno
Asked On July 11, 2017 12:03 PM

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?

Rajesh Rajendiran [Syncfusion]
Replied On July 12, 2017 08:45 AM

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 


Bruno
Replied On July 12, 2017 08:50 AM

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?

Rajesh Rajendiran [Syncfusion]
Replied On July 12, 2017 09:03 AM

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 


Bruno
Replied On July 12, 2017 09:16 AM

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




Rajesh Rajendiran [Syncfusion]
Replied On July 13, 2017 09:02 AM

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 


Bruno
Replied On July 13, 2017 09:14 AM

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?


Rajesh Rajendiran [Syncfusion]
Replied On July 14, 2017 05:54 AM

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 


Bruno
Replied On July 15, 2017 04:08 AM

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?


Bruno
Replied On July 17, 2017 04:02 AM

 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;