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

Cascading Parameter Multivalue Label

3 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 23 May 2014, 12:45 AM
I have a report parameter that as its available values has a stored proc, which returns a set of (ID, Name) records.
The is a multi value parameter, so the user selects 1 or more of the items in the list.
So far so good.
The selected IDs are then passed to a Stored Proc when the report is rendered, and all is well and good.
However...In the header of each page, I want to show the parameters that were used, but not the IDs, the Names.
You can only really use parameters in the header.
So basically I want a second parameter to get the concatenated list of Names selected from the first parameter.

For instance, if the data set is

17 Oslo
22 Stockholm
31 Copenhagen

And the user selects Oslo and Stockhom, then the report sp is passed 17, 22, but I want the header to show "Oslo, Stockholm", not "17, 22".... And as an additional constraint this is for a TRDX with no C# coding.



3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 27 May 2014, 12:33 PM
Hello John,

Thank you for contacting Telerik Support.

When setting up multivalue report parameters you can specify which data fields to use for a ValueMember and DisplayMember of the report parameter.
If you want to use the names of the cities, you should set them as the DisplayMember​ and later use Parameters.Parameter1.Label in the report header expressions: screenshot.

I will be happy to assist you if you have further questions.

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
John
Top achievements
Rank 1
answered on 27 May 2014, 04:55 PM
I think you might be missing my point. I do understand what the ValueMember and DisplayMember are, and nothing is a problem there. Let me repeat my problem below

For instance, if the data set is

17 Oslo
22 Stockholm
31 Copenhagen

And the user selects Oslo and Stockhom, then the report sp is passed 17, 22, but I want the header to show "Oslo, Stockholm", not "17, 22".... And as an additional constraint this is for a TRDX with no C# coding.

So, in parameter 1, I have in effect selected 17,22, which the report needs to render.
But at the same time I need to show "Oslo, Stockholm" in the header of the report.

How do I do that?
0
John
Top achievements
Rank 1
answered on 29 May 2014, 02:57 PM
I solved this one myself.

In the header, I have a text box with the Value:

=Join(", ", Parameters.CityList.Label)

CityList is a multi value parameter bound to a StoredProc.

With this setup, the parameter correctly passes a list of CityIDs to the report, and the header shows the names of the cities chosen.
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Nasko
Telerik team
John
Top achievements
Rank 1
Share this question
or