BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JoanSo
Fluorite | Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions
FredrikE
Rhodochrosite | Level 12

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

View solution in original post

4 REPLIES 4
JuanS_OCS
Amethyst | Level 16

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:

 

http://documentation.sas.com/?docsetId=stpug&docsetTarget=p184mqqbi9w6qjn1q0619x19eg02.htm&docsetVer...

 

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.

 

 

 

 

 

JoanSo
Fluorite | Level 6

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!

FredrikE
Rhodochrosite | Level 12

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

JoanSo
Fluorite | Level 6

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 🙂 

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 4 replies
  • 2608 views
  • 3 likes
  • 3 in conversation