March 7, 2011 at 4:11 am
Hello
I am trying to return a "last login" time for a user in 2 different databases using SSRS 2005.
The user's "user ID" is the same in both systems so my SQL queries are very basic:
select userid, max(logintime) from database where userid = @userid group by userid
When I run the report it gives me a userID box where I can enter the user's name. However, if I have 2 queries, can I use this parameter twice? I'd rather keep this all in one report but open to suggestions.
Thanks in advance for any assistance.
March 7, 2011 at 7:33 am
Yes, 2 datasets in a single report can reference a single parameter.
March 8, 2011 at 5:18 am
Hi
Thanks for your response.
So I have 2 reports, each with it's own data set. These work individually.
I can add both to a single report but get an error "sub report could not be shown".
How do I use a parameter here which will set the userID in both sub reports?
Thanks.
March 10, 2011 at 2:01 am
Got this one sorted after speaking to a colleague, thanks.
FYI - added UserID via Report -> Report Parameters and then added these to the individual reports via report properties.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply