Default parameter to auto-check all checkboxes

(2 posts) (2 voices)

Tags:

No tags yet.

  1. adamhaeder, Member

    I have a parameter query (checkbox) called 'Gender' that looks like this:

    SELECT 'male', 'Male' UNION SELECT 'female', 'Female'

    I want both boxes to be checked by default when a user first pulls up the report, so I made another parameter query (default) called 'Gender Default':

    SELECT 'male', 'Male' UNION SELECT 'female', 'Female'

    But when I first run the report, both boxes are unchecked. What am I doing wrong?

    Thanks

  2. myDBR Team, Key Master

    The checkbox default is a comma separated list (as one parameter can take multiple values). Now that your datatype is a varchar, you need to put the values in apostrophes. So the default will be:

    select "'male','female'"

    --
    myDBR Team


Reply

You must log in to post.