Hello
I would like to add in the report a text box with the date of now and logged user.
The problem is the looged user, what can I use for that?
A parameter with a variable in the "current value" = the system variable for current user
Or the variable straight into the text box?
In the following images you can see how I what it to look in the report:
Hope you can help me with this 🙂 thank you!
Data: 9/2/2018 UUser: &SAS.Userid or &SYSUSERID
Hi!
One way could be to create a table with all your users, that can easily be done by reading the users from metadata %MDUEXTR;
Import the table to VA and create a row level condition where (userid = 'SUB::SAS.Userid')
Add the table to your report and if you are using 7.4 or 8.2 use a dynamic text to show the user, otherwise a table or listbox/list might work.
//Fredrik
Hello @JoanSo,
I think you would need a Stored Process, who will be able to pick up the user id of the SAS session.
Then, the SAS Stored Process reserver variables will automatically contain the user id on several forms:
METAPERSON
|
All
|
Specifies the person metadata name that is associated with the _METAUSER login variable. The value of this variable can be
UNKNOWN . This variable cannot be modified by the client. |
_METAUSER
|
All
|
Specifies the login user name that is used to connect to the metadata server. This variable cannot be modified by the client.
|
_username
|
Web Clients
|
Specifies the value for the user name that is obtained from web client authentication.
|
In some deployments this might be tricky if you have SSO or SAS Token Authentication. But try and one of them should give you the required result.
I looked for stored process and one of the obstacles is:
"You cannot add a stored process to a report if the precision layout view is selected. If the report already contains a stored process, then the stored process is removed if you change to precision layout."
I have all my dashboards with the precision layout.
Is there another way of doing this?
Thank you!
Hi!
One way could be to create a table with all your users, that can easily be done by reading the users from metadata %MDUEXTR;
Import the table to VA and create a row level condition where (userid = 'SUB::SAS.Userid')
Add the table to your report and if you are using 7.4 or 8.2 use a dynamic text to show the user, otherwise a table or listbox/list might work.
//Fredrik
Hey!
I did the step you sugested but the viewer only shows an "Alert" in the table that has de colum "userid".
I'm still looking for the reason..
Thank you for the idea 🙂
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.