BookmarkSubscribeRSS Feed
Ronny_Dsouza
Obsidian | Level 7

Hi ,

 

We have a requirement , wherein as part of the footer we need to showcase the user who is viewing the report,  GIven that we know that the same is not availbale OOTB, we thought that we would have an STP capture the same and display in the lower section of the report,

 

Any thoughts of a better way to do so. Please let us know.

 

cheers

Ron

3 REPLIES 3
Madelyn_SAS
SAS Super FREQ

I think that the stored process is a good idea. You could use code similar to this. This link has the list of reserved macros:

http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#p184mqqbi9w6qjn1q061...

 

*ProcessBody;
%stpbegin;

data t; 
user_details = "Query submitted by - &_METAPERSON "; 
run; 
proc report data = t nowd noheader style =[bordercolor=white cellwidth=700 ] 
style(column)=[font_weight =bold font_style=italic] ; 
title; 
run; 

%stpend;

 

Here it is in a report (bottom left)

 sample_footer.jpg


sample_footer.jpg
Ronny_Dsouza
Obsidian | Level 7

Yup, thats the approach we have kept it so far, the only drawback is we loose the synchronization among all the objects in the report.  anyways we can retain that functionality along with the STP presence.

Madelyn_SAS
SAS Super FREQ

You cannot synchronize as long as the section includes a stored process. Another possible workaround is to edit the information map to add a character data item with the expression:

scan("&_METAUSER",1,'@')

 

Then, hide that data item in all objects, placing it in a list table at the bottom of the report.

sample_footer_2.jpg

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1219 views
  • 0 likes
  • 2 in conversation