Can't reference parameters in the Column Grouping?

0 Answers 14 Views
Report Parameters
Richard
Top achievements
Rank 1
Richard asked on 10 Sep 2021, 02:05 PM

Hi Guys

 

I want the user to be able to select which columns we display in their reports. I've got a multiselect parameter that has a list of the reports' columns as the display member (and a number as the value member).

 

In the Column Groups I've added in a filter on one of the columns like so:

However when I try to run the report I get this error:

 

I've troubleshooted the Parameters.availableColumns.Value and it has the expected values.

 

I've troubleshooted this expression "1 In Parameters.availableColumns.Value" in the report body itself and it works as expected (shows true/false correctly)

 

I've changed the expression in the Column Grouping box to both "1 = 1" and "1 =2" and it shows/hides the column as expected.

 

The only thing I can think of is Parameters.availableColumns.Value isn't populated when it hits that expression in the Column Grouping. Is that right? And if so how can I go about giving the user the option to select the columns they want to show?

Dimitar
Telerik team
commented on 15 Sep 2021, 09:12 AM

I tried to reproduce the problem with the latest version of Telerik Reporting but was unable to do so. Could you please specify which version of Telerik Reporting you are using?

Also, is the issue present with column groups only? Have you tested if you can use the parameter with row groups? In my testing, I was able to use the report parameters with both column and row groups.

Are sure that the report parameter has a valid value? If I understood correctly, the availableValues report parameter should be a list of the crosstab's columns, is that correct? Make sure that the value is valid, you may try to hardcode an array for the sake of testing, with the Array() utility function.

If you are unable to make it work with report parameters in the group's filter, you may hide columns by using Conditional Formatting on the crosstab's columns.

If you would need further help, please attach the report in question to this thread, alongside some sample data, and we will inspect it locally.

No answers yet. Maybe you can help?

Tags
Report Parameters
Asked by
Richard
Top achievements
Rank 1
Share this question
or