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

Accessing Report Parameter controls

3 Answers 176 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 30 Nov 2014, 12:53 AM
I
have a Web based report viewer that I need to load a report into. The report
has several parameters. Two of them are visible to the user. The report queries
are based on the selection of one of these two parameters. So the requirement
is that I need to limit the user to selecting only one of the two parameters.
In order to know which one was selected I need to be able to access the
parameter input controls from the code behind. I am assuming that these are
members of the RadReportViewer control.

How
would I implement this solution? How do I go about accessing the Parameter
inputs (two dropdownbox’s)?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 03 Dec 2014, 12:59 PM
Hello Mark,

There is no out of the box support for your inquiry. The built-in report parameters' purpose is to provide basic UI that is available out of the box and that is sufficient for most scenarios. For other cases, when you require customization, you can hide all report parameters (Visible=false), and create your own custom parameter UI that you can wire up to the Report API.

Regards,
Nasko
Telerik
 

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.

 
0
Mark
Top achievements
Rank 1
answered on 03 Dec 2014, 02:57 PM
Okay,
we I didn't think there would be an out of the box solution. I was hoping could
do it without creating a custom UI for this report. I am very familiar with do
it. I thought I could use JQuery to toggle the parameter inputs but I can’t
seem to get to the element change events when the inputs are clicked. If I
could do that then that is half the job. I can use code behind in the report to
detect which parameter is null and choose the appropriate data source.

Is there anything you can tell me about the client side structure that would
help me hook up a JQuery event handler to the inputs in the parameter table?

It
looks like the parameters area might be in an <Iframe> I’m not sure.
Below is the html parameter inputs generated by the ReportViewer object. There
are two checkboxes that control the availability of the dropdown boxes. Being able
to toggle checkboxes would do the trick. Perhaps if this is not possible it
could be an added feature in the future. Add a simple toggle parameters setup
in the report designer parameters control that could be selected along with
checkboxes to choose which parameters to toggle. The rest could be handled with
java in the ReportViewer.js.
<span class="ParameterEditor"><input id="parameterEditormanagerID_nullSelectormanagerID_checkBoxmanagerID" type="checkbox" name="parameterEditormanagerID$nullSelectormanagerID$checkBoxmanagerID" onclick="parameterEditormanagerID_valueEditormanagerID.ToggleEnable();" /><label for="parameterEditormanagerID_nullSelectormanagerID_checkBoxmanagerID">Null</label></span>
 
<span class="ParameterEditor"><input id="parameterEditorLocation_nullSelectorLocation_checkBoxLocation" type="checkbox" name="parameterEditorLocation$nullSelectorLocation$checkBoxLocation" checked="checked" onclick="parameterEditorLocation_valueEditorLocation.ToggleEnable();" /><label for="parameterEditorLocation_nullSelectorLocation_checkBoxLocation">Null</label></span>

0
Nasko
Telerik team
answered on 08 Dec 2014, 12:42 PM
Hello Mark,

Unfortunately it is not possible to hook up a jQuery event handler to the parameter inputs. This is why we suggested you to use a custom UI where you can create your own inputs and handle their events.
Additional information on the client-side API of the Web Forms Report Viewer is available here: ASP.NET Web Forms Report Viewer Client-Side API.

Regards,
Nasko
Telerik
 

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.

 
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Mark
Top achievements
Rank 1
Share this question
or