This is a migrated thread and some comments may be shown as answers.

Change Connection String in Web API

1 Answer 164 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 15 Jul 2014, 01:18 AM
I follow the blog post from Establishing a Telerik RESTful Reporting Service in under 5 Minutes and I can now have the web api up and run.

For all the report (trdx file) in the web api, we need to state the connection string in the web.config, but for our case, we have a class which provide the DB connection string to the program like:

Container ctx = new Container();

reportSource = ctx.ConnectionString;

How can I implement to my new Web API project in this case?

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 16 Jul 2014, 06:49 PM
Hi Alex,

Please refer top the reply in your support ticket on the same question:

"...our recommendation is to follow our online documentation and the How To: Add the HTML5 Report Viewer to an HTML page and How To: Add Telerik Reporting REST Web API to Web Application help articles in particular for up-to-date information in your scenario.
In case you need to make any modifications to a TRDX report before displaying it in the viewer, such as changing the connection string, you will have to deserialize the TRDX report to a report object and modify it inside a custom report resolver. For more information, please refer to the Serializing Report Definition in XML and How To: Implement a Custom Report Resolver help articles.
"

If you need further help, let us continue the discussion in your support ticket to have all details in a single thread.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or