Hi @Navinkumar Kanagaraj ,
I assume the dataset query for parameter Subcategory is from database table [TableC]
CREATE TABLE TABLEC
(CATEGORY VARCHAR(20),
NAME VARCHAR(20)) DELETE FROM TABLEC
INSERT INTO TABLEC
SELECT 'FRUIT','GRAPE'
UNION ALL
SELECT 'FRUIT','XXX'
SELECT * FROM TABLEC
The query used for the dataset is as follows:
declare @hasappleororange int
set @hasappleororange =(select count(*)from TABLEC where NAME in('APPLE','ORANGE'))
if (@hasappleororange>=1)
SELECT distinct NAME from TABLEC where NAME in('APPLE','ORANGE')
else
SELECT * FROM (VALUES('GRAPE'),('KIWI')) AS p(NAME)
Preview:
And always keep refreshing in the Parameter Properties:
Best Regards,
Joy
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.