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

Format of the initialization string... still failing

1 Answer 227 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Rory asked on 04 Dec 2013, 05:19 PM
hello, i hope someone can help me with this problem.  

I have a mvc web app that has an edmx connection setup.  i added a class library to run the reports and created a new edmx in that class library.  

i am trying to setup a simple test report using the new HTML5 viewer.

I setup entity framework using your articles which seemed to work.

I am getting the dreaded 'Format of the initialization string does not conform to specification starting at index 0.' error and although i have copied the connection string from my reports project app.config to the main application web.config, i still get this error when trying to view the report through the application.  The report is visible using the preview mode in the visual studio.

The report only has one table on it which was setup using the table wizard.

my connection strings in the web.config:
<add name="TargetZeroEntities" connectionString="metadata=res://*/TargetZero.csdl|res://*/TargetZero.ssdl|res://*/TargetZero.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=uldev02\sql2008;initial catalog=TargetZero;persist security info=True;user id=TargetZeroDev;password=TargetZeroDev1@;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /><br>
    <add name="TargetZeroReportEntities" connectionString="metadata=res://*/ReportingContext.csdl|res://*/ReportingContext.ssdl|res://*/ReportingContext.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=uldev02\sql2008;initial catalog=TargetZero;persist security info=True;user id=TargetZeroDev;password=TargetZeroDev1@;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient"/>

The 2nd one(TargetZeroReportEntities) is used for the reporting project and was copied exactly as is from that project.

the report is very simple:

            this.DataSource = entityDataSource1;
            this.table1.DataSource = entityDataSource1;

any suggestions to resolve this error?

EDIT: this has nothing to do with the table on the report.  I tried deleting that and i still get the same error.

EDIT2:  i have also gone through this article on setting up the datasource manually for production but it did not resolve this issue.

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 09 Dec 2013, 02:15 PM
Hi Rory,

Most probably the issue is related to a mistyped connection string or lacking permissions to access the database from the application. The attachment contains a database, EF model created based on the database and a reports library project using that EF model. The report can be displayed in any project, all you need is to copy the connection string from the reports library project app.config to the new project.

Please test it your side and compare the settings to yours.


New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question