开发者

Display ALL when all the values are selected

I have dropdown parameter with multi-values allowed. In my report header I want to show all the dropdown values that were checked by the user to run the report. But since there could be a couple of hundred values I want开发者_如何学运维 to show 'ALL' when all the values are selected instead of listing them one by one. How can I do that?

Thanks,


Maybe you could feed the results into a subreport which would count the total # of values available vs selected. If they are equal, then it would return "All".


If this is a static list, you can do something like this :

If UBound({?MyParameter}) = @ValueCount Then 'All' Else Join({?MyParameter}, ', ')

where @ValueCount is the number of possible values for the parameter.

If the number of possible parameters is varying between executions, then PowerUser's subreport method is one option.


You can do this if you read the list of parameter values from the database, you can then use a query to get the number of options.

Edit the parameter, set "List of Values" = Dynamic

Add a Command in the Database Expert to get your option count, something like:

SELECT COUNT(DISTINCT option) optCount FROM optTable

Then, building on CodeByMoonlight's suggestion, use a formula:

If UBound({?MyParameter}) = {Command.optCount} THEN "ALL"
ELSE Join({?MyParameter}, ', ')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜