Report Property of Report Viewer

12 posts, 0 answers
  1. Justin
    Justin avatar
    4 posts
    Member since:
    Jul 2011

    Posted 23 Aug 2011 Link to this post

    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.
  2. Peter
    Admin
    Peter avatar
    1665 posts

    Posted 26 Aug 2011 Link to this post

    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 >>

  3. KERRY
    KERRY avatar
    1 posts
    Member since:
    Jun 2011

    Posted 04 Nov 2011 Link to this post

    Peter,
      What was the resolution on this.  I am getting the exact same error.  Any help would be appreciated.
  4. Steve
    Admin
    Steve avatar
    10940 posts

    Posted 07 Nov 2011 Link to this post

    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.

  5. OverCoded
    OverCoded avatar
    34 posts
    Member since:
    Mar 2010

    Posted 01 Dec 2011 Link to this post

    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?
  6. Jim
    Jim avatar
    26 posts
    Member since:
    Aug 2006

    Posted 30 Jul 2013 Link to this post

    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.
  7. Hadib Ahmabi
    Hadib Ahmabi avatar
    181 posts
    Member since:
    Nov 2011

    Posted 02 Aug 2013 Link to this post

    What changes exactly? Try to revert them and find out why it happened. 
  8. Eric
    Eric avatar
    10 posts
    Member since:
    Feb 2014

    Posted 28 Jun 2014 in reply to Hadib Ahmabi Link to this post

    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
  9. Eric
    Eric avatar
    10 posts
    Member since:
    Feb 2014

    Posted 28 Jun 2014 in reply to Eric Link to this post

    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
  10. Javier
    Javier avatar
    16 posts
    Member since:
    Feb 2015

    Posted 27 Apr 2015 Link to this post

    Thanks Erick,  your post save my day
  11. Eric
    Eric avatar
    10 posts
    Member since:
    Feb 2014

    Posted 27 Apr 2015 in reply to Javier Link to this post

    Glad to help.
  12. headPropellerHead
    headPropellerHead avatar
    15 posts
    Member since:
    Jul 2007

    Posted 21 Jun 2018 Link to this post

    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".
Back to Top