Group By Parameter

  • I am creating a report with multi-parameters for the user to choose from.

    I am new to reporting services

    Example,

    part of the multi-parameter is that an individual will choose the programs, staff, or by client id.

    I have read several different things that state I would need to create a parameter. I have done that but I want the parameter to pull from a query from the staff table. I am not sure how I finish setting up the parameter so that an individual running the report will the have the option to group by these items above.

  • Check out the attached report file. You'll need to change the Data Source "DS_Database" to point to a real server for the report to run.

    This has an example of how to group by parameter (check out the expression behind Group 1 > "Group on"), and also an example of how to filter the report by a parameter.

  • Thank you. For the most part it worked except that I am not able to group by client ID. I can group by staff and program. Below is the Iif expression. Where am I going wrong.

    =iif(

    Parameters!GROUPING.Value = "Staff", Fields!UserCode.Value

    , iif(

    Parameters!GROUPING.Value = "Client ID", Fields!ClientID.Value

    , Fields!ProgramName.Value

    )

    )

  • The IIF statements are missing the false part for it to evaluate.

    IIF(<test - evaluates to true or false>, <what to do if true>, <what to do if false>)

    =iif(

    Parameters!GROUPING.Value = "Staff", Fields!UserCode.Value

    , iif(

    Parameters!GROUPING.Value = "Client ID", Fields!ClientID.Value

    , Fields!ProgramName.Value

    ),""

    )

    Add something at the end to tell the expression what to do if it is false.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply