Greetings,
I have an SSRS Report where I am trying to create a parameter of text Dropdowns from a SQL Column of Integer values. The original came from an XML document. I tried creating a Case Statement and adding "and ApptStatus = @status" to my where clause, but my derived column name is not recognized. The object is to create a parameter where I can offer the User (A,B.C.D) as multivalue options rather than the arcane 12,13,14,15. Not quite sure how to structure this and any suggestions would be appreciated. Thanks
Case
When m.c.value('status', 'int') = 12 Then 'A'
When m.c.value('@status', 'int') = 13 Then 'B'
When m.c.value('@status', 'int') = 14 Then 'C'
When m.c.value('@status', 'int') = 15 Then 'D'
End as ApptStatus,
If this case statement is in the same query as the criteria, the alias won't be available. I would put the entire query into a cte, then treat the cte as the query. This way, the alias will now be available.
February 3, 2021 at 5:34 pm
That should work. Thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply