Hi,

Using BIDS / Report Designer with SSRS / SQL2005(SP2) and for one dataset, I'm trying to make a CTE into a 'dynamic' query by wrapping the accessor query in an Iif() function. Here it is:

Code:
= "with fpy_insp1 as " &
"(  " &
"select count(distinct(alias)) as fmacount " &
"from e_cs_mfdunit_history " &
"where (product_id like '103%'
...