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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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