Hello Friends,
I have 2 parameter in my report
DECLARE @ARTWRKTYP INT<br />
DECLARE @IARTWRKTYP INT
and the dependance of both parameter as follows
IF @ARTWRKTYP = 1
BEGIN
SET @IARTWRKTYP = 2
END
ELSE IF @ARTWRKTYP = 4
BEGIN
SET @IARTWRKTYP = 5
END
ELSE IF @ARTWRKTYP = 3
BEGIN
SET @IARTWRKTYP = 6
END
How i use this parameter in Query
select M.jobno [JobNo],clientname [Client],brandname [Brand],projectname [Project],awcategoryname [Artwork],CONVERT(VARCHAR(10),M.mechanicaldate,103)[Job Date],
case
when M.artworktype = 1 then 'Artwork Master'
when M.artworktype = 4 then 'Creative Master'
when M.artworktype = 9 then 'Studio Master'
end [JobType]
from tbl_mechanicalbrief M
INNER JOIN tbl_client C ON C.clientid= M.clientid
INNER JOIN tbl_brand B ON B.brandid=M.brandid
INNER JOIN tbl_project P ON P.projectid=M.projectid
INNER JOIN tbl_awcategory AW ON AW.awcategoryid=M.artworkcategoryid
where (CONVERT(date, M.Mechanicaldate,103) between CONVERT(date,@fromdate,103) and CONVERT(date,@todate,103))
AND M.artworktype = @ARTWRKTYP and M.statusid = 45
UNION ALL
select M.jobno [JobNo],clientname [Client],brandname [Brand],projectname [Project],awcategoryname [Artwork],CONVERT(VARCHAR(10),M.iterationdate,103)[Job Date],
case
when M.artworktype = 2 then 'Artwork Iteration'
when M.artworktype = 5 then 'Creative Iteration'
when M.artworktype = 7 then 'Repro'
when M.artworktype = 8 then 'Alia Central'
when M.artworktype = 10 then 'Studio Iteration'
end [JobType]
from tbl_iteration M
INNER JOIN tbl_client C ON C.clientid= M.clientid
INNER JOIN tbl_brand B ON B.brandid=M.brandid
INNER JOIN tbl_project P ON P.projectid=M.projectid
INNER JOIN tbl_awcategory AW ON AW.awcategoryid=M.artworkcategoryid
where (CONVERT(date, M.iterationdate,103) between CONVERT(date,@fromdate,103) and CONVERT(date,@todate,103))
AND M.artworktype = @IARTWRKTYP and M.statusid = 45
How can I define such dependance in SSRS??
Any idea?
Thanks in advance. .