Passing parameters from outside the HTML5 Report Viewer

2 posts, 0 answers
  1. Danilo
    Danilo avatar
    1 posts
    Member since:
    Aug 2017

    Posted 05 Sep Link to this post

    Hi guys I explain you my problem: I have defined the template of a report thanks to the StandLone Report Designer,  in this report I have defined two parameters (by the designer). I want to pass one of this parameters from outside of the viewer and one by selecting it inside the viewer.

    How can I do that?

    I have added in my html page this function

            $('#Nome').change(function () {
                var viewer = $("#reportViewer1").data("telerik_ReportViewer");
                viewer.reportSource({
                    report: viewer.reportSource().report,
                    parameters: { Nome:$(this).val() }
                });
            });

    The parameter that I want to change is called "Nome", but it doesn't do anything! How can I link the textbox (its id is "Nome") created outside the viewer  (where I will write the parameter) to the parameter "Nome" defined into the designer?

    Thank you for helping

  2. Katia
    Admin
    Katia avatar
    600 posts

    Posted 07 Sep Link to this post

    Hi Danilo,

    The JavaScript that is used to update the viewer's report source seems to be correct - How To: Pass Values to Report Parameters.

    Do you actually use Nome report parameter somewhere in report expressions, for example to filter the data? Also, make sure that you pass the valid value for this parameter. In case, Nome report parameter has its AvailableValues.DataSource property set the value you pass must be in the range of the available values.

    You can attach some screen shots that illustrate the settings of Nome parameter so we can understand the scenario more clearly.


    Regards,
    Katia
    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