Broken Parameters

2 posts, 1 answers
  1. John
    John avatar
    1 posts
    Member since:
    Jan 2018

    Posted 14 Mar Link to this post

    I have a very simple query (below). I have tested in SQL Management Studio as well as the Configure DataSource in the Telerik Report Designer. Both return 19 rows of data. I added the ISNULL as those fields have the ability to be NULL and wanted to eliminate them from causing an error. If there is no parameter in query everything works perfect. When a parameter is filled in I see the title of the TABLE but the rest is blank. I know this is something beyond simple. 

    If I put in a default value into the parameter field on the table not even the header appears. The attachment shows how the Parameter is setup. Originally I was trying to pass the RegardingIdentifier (Guid) and through that was it so I modified the routine to use a string and still get the same results.

     

    SELECT 

      Tasks.TaskIdentifier
    , Tasks.RegardingIdentifier
    , Tasks.StatusIdentifier
    , Tasks.TaskNumber
    , Tasks.DescriptionShort
    , Tasks.StartDate
    , Tasks.DueDate
    , ISNULL(Tasks.Priority, 'Normal') AS Priority
    , ISNULL(Tasks.EstimatedHours, 0) AS EstimatedHours
    , ISNULL(Tasks.PercentComplete, 0) AS PercentComplete
    , ISNULL(Status.FieldName, '') AS TaskStatus
    FROM 
    Tasks 
    LEFT OUTER JOIN AppSettings Status ON Tasks.StatusIdentifier = Status.AppSettingIdentifier
    LEFT OUTER JOIN Accounts ON Tasks.RegardingIdentifier = Accounts.AccountIdentifier
    WHERE 
    (Accounts.AccountCode = @AccountCode)
    AND (Tasks.TaskComplete = 0)
    ORDER BY 
    Tasks.TaskNumber

  2. Answer
    Todor
    Admin
    Todor avatar
    52 posts

    Posted 19 Mar Link to this post

    Hello John,

    The screenshot shows configuration of a Report Parameter. Have you linked the Report Parameter to the corresponding SqlDataSource Parameter?

    You can check how to do it through the Report Designer in the '4. Configure Data Source Parameters' section of the SqlDataSource Wizard article, or
    programmatically in the Using Parameters with the SqlDataSource component article - Binding SQL Query Parameters to Report Parameters section.

    Regards,
    Todor
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top