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

Telerik Report Viewer 2016 not showing the report

1 Answer 294 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aakash
Top achievements
Rank 1
Aakash asked on 25 Jan 2017, 11:53 AM

I am beginner in Telerik Reporting. I have created an Telerik Report by Telerik Report Q1 2016 Wizard. The designer is showing report well but when i attach it with Telerik Report Viewer it gives following error:

 

"an error occured while processing Table 'table1':

Unable to establish a connection to the database. Please, verify that your connection is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your aplicaion.

--------InnerException---------

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

 

My code is:

 private void ReportViewerForm1_Load(object sender, EventArgs e)
        {
            Report1 rp = new Report1();
            reportViewer1.Report = rp;
            
            this.reportViewer1.RefreshReport();
        }

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 25 Jan 2017, 03:14 PM
Hi Akash,

The connection used on configuring the SqlDataSource component is saved in the config file of the report's project. You need to copy the connection string in the viewer's project configuration file. The reporting engine uses ConfigurationManager to search the connection string by name in the current project's configuration file.

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


On a side note, the viewer's Report property is obsolete. Please switch to use the viewer's ReportSource property - Report Sources.

Regards,
Stef
Telerik by Progress
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
General Discussions
Asked by
Aakash
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or