No parameters available

(4 posts) (2 voices)

Tags:

No tags yet.

  1. Tom, Member

    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?

  2. myDBR Team, Key Master

    Hi,
    connected parameters (which the second parameter is) need to refer to a parameter which is a popup, checkbox or the radio button.

    Easiest way of dealing with the issue is to make the first parameter a searchable popup. it will also be easier for the user to search / select the user from the list. You can include both user names and ID's to the visible part.

    You may also want to turn the parameter query into a procedure so you can use the logical parameter names instead of the old 'mydbr_param1' syntax. Makes maintenance easier.

    --
    myDBR Team

  3. Tom, Member

    Ah yes, now that I read the help file in more detail: "The reference to another popup/radio button can be made with following methods". I just did not interpret this as "Can only be to other popup/checkbox/radio buttons". Maybe a small line of explicit explanation can be added for future readers?

    Cheers,
    Tom

  4. myDBR Team, Key Master

    We'll improve the documentation.

    --
    myDBR Team


Reply

You must log in to post.