Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Setting up an "All" Parameter

$
0
0
Hi!

Please my english language is not very good. But I try to explain my problem.

Now I want to set up an "all" parameter to give users possibility to choose either one of the parameter values or "all ".

To answer this, I have done:

Query to for the parameter values

SELECT
'All Product Category' AS category
UNION
SELECT name as category
FROM my_table;

I set up my arameter called "category_name", tick "mandatory", select the query as the source, type "string"

Set up my main query that feeds the report

SELECT
[...]
WHERE category_name=${category_name} OR 'All product category'=${category_name}

When I ended with this, all seens to be ok when I select any category rather than All product category. But when I select All product category, the result is not what I expect(select all category in list).

Please someone cant help me?

I use: Postgrsql 9.4 and Pentaho 6.1


Regard,

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>