This is a migrated thread and some comments may be shown as answers.

Passing parameters from outside the HTML5 Report Viewer

1 Answer 483 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Danilo
Top achievements
Rank 1
Danilo asked on 05 Sep 2017, 08:24 AM

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

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 07 Sep 2017, 01:56 PM
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
Tags
General Discussions
Asked by
Danilo
Top achievements
Rank 1
Answers by
Katia
Telerik team
Share this question
or