Dynamic filter based on prompt

Hi,

I’ve read some threads about this but not sure they can fit my requirements.

BO XI 3.1 on Oracle 10g

I have a report which I have to apply a dynamic filter based on a user prompt values. For example, I have 1 prompt: Product and dynamic/multiple filters (eg: Model, Color, Size).

Consider 2 Products:
Product A & Product B.
Product A has 3 filters but Product B only has 2 filters.

Now what is required is:
Let say when the user chooses Product A, the report will generate with 3 filters condition like Model, Color and Size. But when the user chooses Product B, it will generate the report with 2 filters condition only like Model and Color.

I hope my explanation is clear. Can someone please explain me how can we achieve it in BOXI 3.1 WebI.

Thanks in Advance.

Regards,
areknee


areknee :malaysia: (BOB member since 2010-04-07)

Hi,

Can you cerate object some thing like this universe. I don’t have the environment to verify this code.

CASE WHEN (Product = @Prompt('Enter PRODUCT:','A',{'Product A','Product B'},MONO,constrained))=Product A THEN (CASE WHEN Model='XXXX' AND Color='YYYY' AND Size ='ZZZZ' THEN FIELD END) WHEN (Product = @Prompt('Enter PRODUCT:','A',{'Product A','Product B'},MONO,constrained))=Product B THEN (CASE WHEN Model='XXXX' AND Color='YYYY' THEN FIELD END) END

Thanks,
Arun


arung :india: (BOB member since 2007-07-18)

Hi Arung,

Thanks for your information. I understand your code, but I think I oversimplified my requirement.

In your code, the filter value is static right? means it will automatically filter the value in Model, Color and Size for Product A before generate the report, isn’t?

but in my requirement, for filters, user can choose which values they want in order to do the filter. Let say after they chose Produt A, in the report will be 3 filters which is Model, color and size with default value like ALL. After that, they can play with the filters.

ie:
Model: Nokia, Color: Red, Size: 2inch
OR Model: Nokia, Color: Black, Size: 3inch
OR Model: Samsung, Color: Red, Size: 2inch

Do you think it is possible if I change your code like this:

CASE WHEN (Product = @Prompt('Enter PRODUCT:','A',{'Product A','Product B'},MONO,constrained))=Product A THEN (CASE WHEN @select('model class\model object') AND @select('color class\color object') AND @select('size class\size object') THEN FIELD END) WHEN (Product = @Prompt('Enter PRODUCT:','A',{'Product A','Product B'},MONO,constrained))=Product B THEN (CASE WHEN @select('model class\model object') AND @select('color class\color object') THEN FIELD END) END

Thanks :slight_smile:


areknee :malaysia: (BOB member since 2010-04-07)