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

Report Property of Report Viewer

11 Answers 248 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 23 Aug 2011, 08:31 PM
I am trying to embed a telerik report into my asp.net web application and am having difficulties.  The report was built in a class library, "blah.Reports" and then the project was added to my application.  I added the reference to the class library as well.  When I try to set the "Report" property of the ReportViewer in my page I get a Visual Studio Error:

Value cannot be null.
Parameter name: key

Because I could not get around this I tried another route:
I looked at some examples and manually set the report property in the xaml with this:
blah.Reports.Statement, blah.Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Now the report shows up in the page with text boxes to enter the parameters, but as soon as I enter them I receive a new error:

An error has occurred while processing Report 'Statement':
Unable to establish a connection to the database. Please, verify that your connection string 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 application.
------------- InnerException -------------
Format of the initialization string does not conform to specification starting at index 0.

I copied the connection string from the app.config of the class library to my asp.net app's web.config, still no dice.  Same error.  Any help would be greatly appreciated.

11 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Aug 2011, 02:14 PM
Hi Justin,

Up to the unresolved connection string we will appreciate if you send us the report class library app.config and report service's web application web.config to review. Additionally our suggestion is to examine configuration files of the demos that came with your installation of Telerik Reporting. (start -> All Programs -> Telerik -> Reporting Q2 2011 -> Visual Studio 2010 Examples )

About the Value cannot be null. error we are unable to reproduce such exception when setting the report viewer report property.

Best wishes,
Peter
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
KERRY
Top achievements
Rank 1
answered on 04 Nov 2011, 06:48 PM
Peter,
  What was the resolution on this.  I am getting the exact same error.  Any help would be appreciated.
0
Steve
Telerik team
answered on 07 Nov 2011, 09:39 AM
Hi Kerry,

The provided information is insufficient for us to determine what is the culprit. Please provide details how/when you get this error (e.g. Preview, WinForms viewer etc.).
The stack trace of the exception would also help and it can be found in Visual Studio's Output Window when running your project. You can also try assigning the report to the viewer via code and see if that makes a difference.

Best wishes,
Steve
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

0
OverCoded
Top achievements
Rank 2
answered on 01 Dec 2011, 04:28 PM
I have the same error! I have a report with several charts and a table. They are all connected to the same database with the same connections string. However, the table generates the error while none of the charts do. As a matter of fact none of the reports in the project that use a table will render. They all produce the following:

   An error has occurred while processing Table 'table1':
Unable to establish a connection to the database. Please, verify that your connection string 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 application.
------------- InnerException -------------
Format of the initialization string does not conform to specification starting at index 0.

This makes no sence. If there is a problem with the database connection none of the charts should work either.

An additional note; the reports render fine in the "report project" Preview and Html Preview tabs. When they are added to a website and loaded into the page they error out.

Coppied the connection string from the app.config to the web.config and it worked. Go figure?
0
Jim
Top achievements
Rank 1
answered on 30 Jul 2013, 11:11 PM
I am getting the same error also.  It was working fine and I was just making some changes to some lables in the graph, when this started.
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 02 Aug 2013, 09:23 AM
What changes exactly? Try to revert them and find out why it happened. 
0
Eric
Top achievements
Rank 1
answered on 28 Jun 2014, 12:10 PM
I too am getting this error.  Only on one of my test installs of my app (VB.net windows app).  Also one client has it on two computers and not on the third.  I've seen this error appear and disappear on my test machines without any details as to why.  Any idea what this error means?  I am able to attach to my IDE and investigate this, but I have no idea where to look for an issue.  The connection string of my report's data source seems fine.

Me.SqlDataSource1.ConnectionString = "SignProx.My.MySettings.AssetsConnectionString1"

I printed it to the screen and it matches my working version.

I am at a loss.

Eric
0
Eric
Top achievements
Rank 1
answered on 28 Jun 2014, 12:27 PM
Problem solved by reading Mark's post here (http://www.telerik.com/forums/292805-format-of-the-initialization-string-does-not-conform-to-specification-starting-at-index-0).  I did not update the user's app config file.  

Eric
0
Javier
Top achievements
Rank 1
answered on 27 Apr 2015, 10:08 PM
Thanks Erick,  your post save my day
0
Eric
Top achievements
Rank 1
answered on 27 Apr 2015, 10:32 PM
Glad to help.
0
headPropellerHead
Top achievements
Rank 1
answered on 21 Jun 2018, 10:55 PM
If anyone is having this error from a Chart in a Report, go into the Properties of the Chart's SQL Data Source.  Set the connection string to the same value that's in the Settings.settings by choosing "Build new data connection" instead of "Existing data connections".
Tags
General Discussions
Asked by
Justin
Top achievements
Rank 1
Answers by
Peter
Telerik team
KERRY
Top achievements
Rank 1
Steve
Telerik team
OverCoded
Top achievements
Rank 2
Jim
Top achievements
Rank 1
Hadib Ahmabi
Top achievements
Rank 1
Eric
Top achievements
Rank 1
Javier
Top achievements
Rank 1
headPropellerHead
Top achievements
Rank 1
Share this question
or