No Connection after Publish Report

6 posts, 0 answers
  1. Rene
    Rene avatar
    3 posts
    Member since:
    Nov 2008

    Posted 12 Mar 2009 Link to this post

    Hello,

    I am new to this forum and I evaluating Telerik reporting Trial version and running against problems with publish the report.

    I have made a simple report and add in the Report designer the database connection with the report wizard. Everything works fine there. However after Publishing the website I have the report but no data in the detail section. Also no error messages are appear. 

    During the report design I have created the Datasource to a Oracle Database.

    I do get data in de detail section when I run the report in de VS development server.

    Why I do have no data in the report. I have searched all available information and could not found anything about this.

    Hopefully some of you can help me.

    Regards

    Rene

  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 13 Mar 2009 Link to this post

    Hello Rene,

    If you have used the Report Wizard to create the report on your dev machine, this means that the connectionString is contained withing the automatically generated DataSetTableAdapter. This means that you would have to either change it by hand to match the correct connectionString on your live server or control the connectionString in some other manner e.g. through the applications config file (web.config for Web app/sites and app.config for windows forms apps). The latter approach is shown in this code library.

    Kind regards,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Stephan
    Stephan avatar
    71 posts
    Member since:
    Jul 2007

    Posted 13 Mar 2009 Link to this post

    Hi Steve,

    the connection string is not the problem I guess. I was trying to help Rene with this issue. We have a separate project to create reports. in the constructor of the report we pass the connectionstring and bind this connection string to the tableAdapter. This means we use a typed dataset to connect to the data.

    When we connect the report to the WebReportViewer, and create an instance of the report, passing in the correct connection string,  we have no problem when we run the side in VS 2008.  The connectionstring we passthrough to the report we read from the Web.Config-file.

    However when we publish the site, and change the connectionstring, if appropriate, we get an empty report. Even when we create a seperate virtual folder in IIS, and put our website in it, on the same machine we use for development.

    We tested the connection string outside the application. For example creating an udl file and creating/testing the connection,  works all just fine.

    summary:
    - When in VS 2008 running the website we can view the report
    - When we publish the report on the the same development machine we get an empty report.
    - We tested the connection string, which is working fine.

    The only thing I can think of, is that the passed in connection string is not correctly applied to the TableAdapter, though that would be highly unlikely because in that case we should have the same problems when running the site in VS. Or the other values are still present in the typeddatset for the connectstring, and these values are used instead of our passed in connect string when we publish the side.

    Hope you can point us in the right direction.

    Thx
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 13 Mar 2009 Link to this post

    Hello Stephan,

    I have two suspicions:
    1. The report is not databound i.e. either the report datasource is not properly populated or the report has no datasource in first place. You say that you provide the connectionString in the report constructor, but where do you actually bind the report - design time, report constructor or NeedDataSource event handler? If you are using the event, are you using the report processing item?
      If there was a datasource set, but it was not populated, it would normally show the report with errors for all fields as there is no database data. Empty report is usually indication of missing datasource.
    2. How do you reference Telerik assemblies? Note that during the installation of Telerik Reporting on your machine, the Telerik assemblies were added to GAC. When deploying a Web App/Site project using Visual Studio's built-in functionality the assemblies from the GAC are not copied automatically, so you need to copy the assemblies manually from the installation’s Telerik Reporting /bin folder to the bin folder of your application. Full details are available in the Deploying Telerik Reporting in production KB article.

    Best wishes,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Rene
    Rene avatar
    3 posts
    Member since:
    Nov 2008

    Posted 13 Mar 2009 Link to this post

    Hello Steve and Stephan,

    Many thanks for the answers given and suggestions to do.

    About the reference Telerik assemblies we have copied them manually so this should not be the problem. For the databound we did not used the NeedDatSource event handler. As I can see we have bind the the report in the design time with the data source. I see the data source selected in the properties of the report. However I noticed that the DataMember is empty, I will check this further and let you now.

    Thanks for the reply

    Regards

    Rene
  7. Rene
    Rene avatar
    3 posts
    Member since:
    Nov 2008

    Posted 16 Mar 2009 Link to this post

    Hi Steve,

    The problem I had is solved. I switched from using the datasource in the report to programmed datasource. Now it works fine and quick.

    Thanks for the feedback and suggestions.

    Regards

    Rene
Back to Top
DevCraft banner