Change SQLDataSource Connectionstring dinamically using parameters

1 Answer 267 Views
.NET 5 DataSource SQL Report Designer - Web Report Parameters
Pino
Top achievements
Rank 1
Pino asked on 25 Nov 2021, 10:02 AM

Goodmorning i have a site developed in .NET 5 that renderize some .trdp report, i compile that report using a stored procedure in my database, actually i pass it my connectionstringstring using the file appsetting.json of my website, but i need to dinamically pass the connectionstring to my SQL DataSource item in my report (maybe using a report parameter?), how can i do that?

i leave you some screen for better explanation.

This is the SQLDataSoruce of my report

this is the appsetting.json file of my website

this is how i pass parameters from a webPage to the report

let me nknow if i was clear or if it possible do what i ask.

Best regards

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 30 Nov 2021, 07:51 AM

Hi Pino,

I suggest using the approach described in the KB article Change Connection String dynamically through a report parameter. Note that it can be used to modify the connection string of data items' data sources and is not applicable for changing the Report Parameters' AvailableValues DataSource connection string.

If you need to modify also parameters' connection strings, I suggest the KB Action NavigateToReport does not work after updating the Connection String dynamically in a Custom Report Resolver.

Regards,
Todor
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
.NET 5 DataSource SQL Report Designer - Web Report Parameters
Asked by
Pino
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or