Data source parameter issue

3 posts, 0 answers
  1. Geoff
    Geoff avatar
    28 posts
    Member since:
    Jul 2010

    Posted 01 Mar 2015 Link to this post

    Hi there,

    Bit of a strange one....

    We have a very simple report - that runs as expected via the preview option in Visual Studio - that has one data source parameter.

    The report library is a class project that we then access from our .NET application.

    The problem is when we try to generate the report from the application the parameter is working weirdly.

    For some reason the stored procedure is called twice - checked by adding logging to the SP.

    First time the parameter is passed, second time a null value is passed. Result is always no data being returned.

    Simplified code to generate report shown below...

    Dim report_1l As CSA_Testing.Competitive_Tendering = New CSA_Testing.Competitive_Tendering
    Dim ds1l As Telerik.Reporting.SqlDataSource = New Telerik.Reporting.SqlDataSource()

    ds1l.ConnectionString = ConfigurationManager.ConnectionStrings("CSA_Testing.My.MySettings.CSA").ConnectionString
    ds1l.SelectCommand = "RepGen_CT_By_CustomerID"
    ds1l.SelectCommandType = SqlDataSourceCommandType.StoredProcedure
    ds1l.Parameters.Add("@CustomerID", System.Data.DbType.Int32, 400045)

    report_1l.DataSource = ds1l

    Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource
    instanceReportSource.ReportDocument = report_1l

    rv1.ReportSource = instanceReportSource

    Has anybody come across this before or have any ideas why it would happen?

    We have an older report libray running off earlier Telerik.Report versions that all work fine.

    Now we have updated to the lateset versions and tried to create some new reports we always get this issue.

    FYI: Visual Studio 2013 / SQL 2012 / Latest Telerik vestions.

    Thanks in advance

  2. Nasko
    Nasko avatar
    1049 posts

    Posted 04 Mar 2015 Link to this post

    Hello Geoff,

    We tested the described behavior locally with the latest version of Telerik Reporting ( and the AdventureWorks sample database. However, we weren't able to reproduce the issue, as you can see in this screenshot and in the attached sample project.
    In order to advise further we will need additional information about the issue and your project/report setup.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Geoff
    Geoff avatar
    28 posts
    Member since:
    Jul 2010

    Posted 04 Mar 2015 in reply to Nasko Link to this post

    Many thanks Nasko

    On comparing our project to yours we noticed there was a problem with our web.config file.

    Silly mistake by us but problem sorted.

    Thanks for your help.

    All the best

Back to Top