BusinessObjects Board

Remove part of Query from SQL based on Report Selection

Hello All,

How are you? I have got this question…I have 2 reports :

  1. One with With or Without Actions
  2. Other Without Actions

( Henceforth I will refer to them as Report 1 and Report 2 )

I have to build this report for users. The question I have is these 2 reports are exactly identical except that one of the Data Provider for Report 2 SUBTRACTS WITH ACTION ITEMS USING CORRELATEED SUBQUERY. For e.g.

NOw this NOT EXISTS CORRELATED SUBQUERY DOES NOT EXIST IN Report 1.

I was wondering if there was anyways to give user ability to select the report from Drop box and on the basis of User selection append the NOT EXIST PART (If user selected Report 2) or Remove it (If user selected Report 1 ).

Thanks in advance,
Sam.


samshaw :us: (BOB member since 2004-12-21)

VBA and prompts would be the only way to go here…


Mak 1 :uk: (BOB member since 2005-01-06)

Hello Mak 1,

How are you? Thanks for your reply. How do you change the part of SQL using VBA?? Is there any sample code or instructions that you could post.I want to do something like this

ALSO , Problem is what do I assign the results of CASE Statement to in my Query to remove or Select Correlated Subquery.

Thanks again,
Sam


samshaw :us: (BOB member since 2004-12-21)

Sam…try this post to see if you can adapt it to your situation…

https://bobj-board.org/t/24319


Mak 1 :uk: (BOB member since 2005-01-06)

Hello Mak,

How are you? Thanks a million for your help…This is great stuff. Please let me know if someone needs my code…however, the logic is exactly the same as in BOB link above.

Have a great day.

Thanks,
Sam


samshaw :us: (BOB member since 2004-12-21)