If you are unable to create a new account, please email support@bspsoftware.com

Author Topic: Conditional Filter  (Read 4880 times)

dferrara

  • Guest
Conditional Filter
« on: 06 Jun 2010 10:08:30 am »
I would like to conditionally control a filter in a report in report studio. Is there away that I can mark a filter optional and then based on a conditional statement determine if the filter will be used or now?

In my case I would like to use the filter based on what the current session group is. If it is group A enable the filter else disable the filter.
Thanks for your help.
« Last Edit: 06 Jun 2010 10:20:11 am by Daffy »

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Conditional Filter
« Reply #1 on: 08 Jun 2010 11:37:31 am »
I think you can add the group level condition in your filter itself.

dferrara

  • Guest
Re: Conditional Filter
« Reply #2 on: 10 Jun 2010 08:09:12 pm »
I would be intersted in hear more how to do this.

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Conditional Filter
« Reply #3 on: 11 Jun 2010 08:28:47 am »
I am assuming this is for a Report studio report.

add a query calculation in the report query called "Group Name" with the following expression #sq(csv(CAMIDListForType('group')))#

Then your filter would include

if ([Group Name] = 'Group A') then (1=1) else ([Data Item] = ?prompt?)

instead of just

[Data Item] = ?prompt? which I guess you have right now.

HTH
2pac

dferrara

  • Guest
Re: Conditional Filter
« Reply #4 on: 22 Jul 2010 08:33:15 am »
Great! thanks