This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Where to utilise Report Parameters?

I'm using v7.1. I've written some reports in Report Designer but I want to add parameters to them and can't find out how to do that. I can create a parameter just fine and have it populated with what I want but I can't see where I can apply that parameter to the data of the report. I've tried adding a where clause to the data source that uses the parameter name eg. where uid_department = departmentParam but this throws an InvalidColumnError, obviously because it's a parameter and not in the table. So where do I apply the parameter to the datasource to filter to only the departments I want?

 

Second question, afterI get one parameter working, is there a way to have one parameter filter another parameter. So for example, I select a department in the parameters and depending on that I only get the roles in that department in the drop down for the second parameter?

 

I've looked at documentation and watched the youtube videos on reports but none of it, unless I've missed it, goes into how to apply parameters or make them dynamic like above.

  • Hi,

    you can use the parameter in your data source by using the parameter syntax of your SQL server your OneIM installation is based on.

    @ParameterName for MS SQL Server

    :ParameterName for Oracle

    In regards to your second question, this is explained in the documentation in chapter Defining Parameter Values.

    Condition (query)

    Limiting condition (where clause) for selecting the value through a table column. You can select a value from the result set. You can select several values from this set if the report parameter is multi-value as well.

    You can reference other report parameters in the condition using the following syntax:

    $PC(<Parametername>)$

    Example:

    UID_Database = $PC(UID)$

    where UID is the name of the referenced report parameter.

    Defining Parameter Values

    https://support.oneidentity.com/technical-documents/identity-manager/7.1/configuration-guide/91#TOPIC-562744

    Report Sample from the documentation that demonstrates the use of a parameter in the query

    https://support.oneidentity.com/technical-documents/identity-manager/7.1/configuration-guide/93#TOPIC-562749

    HtH

  • I'm using SQL so using the '@' syntax. I've got it working for a single valued parameter but when I try to use a multi-value parameter it's not working. The line is

    and departmentname in (@DepartmentParam)

    This works when I go into the portal and select a single department as the parameter in the subscription but when I select 2 departments the attachment to the email is completely blank. Any idea why this is happening?
  • I have the same problem with the Parameter conditions using 'in' for a multi-value parameter. I've got a department parameter and a role parameter. In the role parameter I have this in the condition

    uid_department in ($PC(DepartmentParam)$)

    When I'm subscribing to the report, if I select one department, the roles parameter only lets me select roles within that department. If I select two or more departments, nothing shows up in the roles parameter selection. It seems 'in' isn't working. Is there some different syntax around using parameters and 'in'. For sql reporting, it should just be 'x in (@parameterName)'.
  • All MVPs in One Identity Manager are using chr(7) as delimiter and so do the report parameters.

    Please check https://support.oneidentity.com/technical-documents/identity-manager/7.0.1/configuration-guide/26#TOPIC-427356

    So when you want to use the single values from the MVP in an SQL IN-clause, you have to split the string. Take a look at the parameter FilterList (Excluded groups) in the report VI_UNSGroup_Entitlement_Drifts. The query FilterListObjects demonstrates the use in such cases.

    In you samples the query would look like

    uid_department in (select ParameterValue from dbo.QBM_FCVStringToList($PC(DepartmentParam)$,Char(7),0,1))

    or depending on your posted query snippet

    and departmentname in (select ParameterValue from dbo.QBM_FCVStringToList(@DepartmentParam,Char(7),0,1))