Reporting Parameters

5 posts, 0 answers
  1. Brandon
    Brandon avatar
    5 posts
    Member since:
    Jun 2014

    Posted 27 Jun 2014 Link to this post

    Hello, I am trying to get my first report working with .NET MVC and the Reporting Q2 2014 HTML5 viewer. I was able to create a report viewer page in my application and view the sample reports, but have been unable to pass a report parameter to my custom report. I used the standalone designer to create the .trdx file, specified a parameter (ClientID) to be passed to the datasource, which is a SQL datasource that calls a stored procedure. That stored procedure has a single parameter, @clientID, which is mapped to the report ClientID parameter. The report parameter is an integer, and will eventually be set to visible = false when I get all of this sorted out.

    Using the preview feature of the standalone designer, I got the same error that I see in my web application ('Missing or invalid parameter value. Please input valid data for all parameters.') until I made the parameter visible and entered a value. Once I did that, data was correctly returned. I am passing the report parameters like so:

        var reportSource = new UriReportSource() {
            Uri = Url.Content("EligibilitySummary.trdx")
        reportSource.Parameters.Add(new Parameter("clientID", Clients.GetByAuthenticatedUser().ClientID));

    When the page loads, a breakpoint on the reportSource lines shows that the parameter values are correctly set, and when the report viewer is displayed, the parameter value shows in the parameters pane on the right hand side, but clicking 'Preview' simply repeats the parameter missing message.

    I'm not sure where I've gone wrong in the binding on the web side - some older posts mentioned a version of Newtonsoft.JSON being in the GAC might cause a problem - I have verified that's not the case here.

    Any ideas where I've mis-stepped? 

  2. Brandon
    Brandon avatar
    5 posts
    Member since:
    Jun 2014

    Posted 27 Jun 2014 in reply to Brandon Link to this post

    Well, that was foolish on my part - I looked in the GAC to make sure that I didn't have Newtonsoft.JSON installed, but then it occurred to me that I might have it installed in the project itself. Updating to the latest available package via nuget cured the problem.
  3. Swapnil
    Swapnil avatar
    4 posts
    Member since:
    Aug 2014

    Posted 06 Oct 2014 Link to this post

    I am getting same issue. Your solution help me. Thanks....
  4. Rajesh
    Rajesh avatar
    1 posts
    Member since:
    Oct 2014

    Posted 17 Oct 2014 Link to this post

                I am getting same error.Please suggest me solution.
  5. Stef
    Stef avatar
    3610 posts

    Posted 22 Oct 2014 Link to this post

    Hello Rajesh,

    The solution discussed in this thread is related to updating Newtosoft.Json.dll via Nuget. For further troubleshooting steps, please check this forum thread: HTML5 Report Viewer - Export options are missing.

    If you need further help, feel free to open a support ticket and send us details about the problem and Fiddler's log file.


    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.

Back to Top