I have a nullable datetime2 column. The column contains the most recent login date. If the column is null, the user has not logged in.
I have a SSRS report that filters whether a user has logged in or not. If column is null, then user has not logged in. I have a parameter that takes multiple values(all,logged in, not logged in) that I pass to a stored proc. Currently I have set the values to Logged in = 1 and not logged in = 2.
My storedproc receives the value as @HasLoggedIn varchar(50).
How would I go about selecting either (all,logged in, not logged in) in sql.
Is there a better way to set this up in ssrs?
I’m a bit lost at passing the parameter, but basically I think you’re looking for this:
And here is a Fiddle for it.