Hi,
I've made a report that requires 2 parameters:
- a userId (int), set up as 'default'
- a 'user working under' (parameter query, popup), that looks at the value of userId to show a select box
The parameter query looks like this:
select -1, '#{All}'
union
select * from (
select u.id, concat(first_name, ' ',last_name) as 'name'
from user u
where and
case
when mydbr_param1 = -1 THEN TRUE
else u.supervisor_id = mydbr_param1
end
order by name asc
)t
When I run the report, the second parameter shows a box 'No parameters available'.
Thinking that it was because userId is empty, I gave it a default value of -1, but that also didn't work.
Entering the userId manually and hitting 'Run' says I need a value for my second parameter, but still no selection box.
Is it impossible to reference a 'default' parameter input from a query?