Hi @Raviteja Chinta
apart from what Patrick suggested very wisely ... I might have two feasible options which you might consider as well.
I understood, that you want avoid the prompt depending on something and select A in case 1 and B in case 2.
I will wrap the "something" as "MYPROMPT" in the report and let the SQL do A or B depending on the report parameter values.
Solution 1So, wrapped your prompmany inside an if-then-else with another variable to steer what you want to achieve.
FilterItem in Query looks like this:
[TABSCHEMA] in (
IF ( ?MYPROMPT? = 'FOO' )
THEN ( #sq(promptmany( 'EXTRAPROMPT' , 'string','MYTABLES' ))#)
ELSE ( 'SYSTOOLS' )
)
Case 1. Do not prompt me and show ASetting the value for MYPROMPT in Report properties ... that is Report > Properties > Report >
Prompt for values [ ]
Current Values > MYPROMPT = "DO NOT PROMPT ME"
Now clicking on the report it gives me all tables from schema "SYSTOOLS"
Case 2. Do not prompt me and show BSet MYPROMPT value as before using the value "FOO".
Shows me the values from MYTABLES without prompt.
Case 3. You want the prompt and show A or B depending on selectionSelect in the Report Parameter Values > Prompt for values [X]
Solution 2Call the report via URL passing the parameter as ?p_MYPROMPT=FOO in the URL itself (see Details
here) or via JSON object (details
here )
Let me know if that helped
------------------------------
Ralf Roeber
https://linkedin.com/in/ralf-roeber/------------------------------