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

Dynamically change connection string using parameter

3 Answers 323 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
JD
Top achievements
Rank 1
JD asked on 16 Nov 2018, 08:00 PM

I want to create 1 report where a user would select a parameter and the report would connect to that parameters database.

Right now, I've created multiple reports that are pretty much the same except they are connecting to different databases. I would just like 1 report and based on the parameter the user chooses it will connect to that database.

 

 

 

3 Answers, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 19 Nov 2018, 04:51 PM
Hi JD,

Please check this excellent KB article on the same topic - Change Connection String dynamically through a report parameter.

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
answered on 09 Sep 2019, 11:32 PM

I created the parms as instructed in the article but I am getting an error when trying to preview the report in the designer.

"Format of the initialization string does not conform to the specification starting at index 0"

Do I need to escape or enclose the connection string ?

0
Silviya
Telerik team
answered on 10 Sep 2019, 07:58 AM

Hello Bob,

The "Format of the initialization string does not conform to specification starting at index 0" error message is usually shown when the configuration file of the application does not contain the required named connection string. For more information please check the Connection Strings and Configuration Files MSDN page.

When the reports get rendered in a web application, the configuration file is the corresponding Web.config file. In the Report Designer, the Reporting engine is running in the context of the designer application, hence it is necessary to register the connection string in its configuration file:
   - In the case of Visual Studio designer, this is the App.config file of the corresponding ReportLibrary project.
   - In the case of Standalone designer, this is the Telerik.ReportDesigner.exe.config file that can be found in the folder where the designer executable file is deployed - by default (Telerik Reporting installation folder)\Report Designer.
For more information, please, refer to Configuration article.

Please check the configuration file and make sure that the named connection string used in the report definition exists there.

In case the issue persists, please open a new support ticket and send us a runnable sample project exhibiting the issue, so we can review it locally and advise accordingly.

Best Regards,
Silviya
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Report Designer (standalone)
Asked by
JD
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Share this question
or