Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
(1).In my ssrs report I have 2 queries which i need to put in my dataset.
Based on a dropdown parameter I want to select which query to run.
Is it Possible to do so? Plz, help me out.

Ex.
IIf (Parameters!sFlag.Value == "0")
{ Query1}
else
{Query2}

(2).Also based on same parameter i want to select fields in a textbox.

Ex.
=IIf(Fields!IsFlag.Value="0" , Fields!Field3.Value, Fields!Field18.Value)


Thank u in advance..!
Posted
Updated 17-Feb-15 23:21pm
v2

1 solution

You can use a fix write in the sql query in this way :

query 1
where parameters1
union all
query 2
where parameters2


remember,
for proceed in this way the field of the 2 query must be in the same order (and number)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900