BookmarkSubscribeRSS Feed
asmits
Calcite | Level 5
I want to use a by variable in an ENTRY statement, using a function or text expression, it does not seem to work. Does anyone know a way to use BY variables outside of the title and byline?
thanks,
Alain
7 REPLIES 7
DanH_sas
SAS Super FREQ
If you are creating your own graph template and rendering it with PROC SGRENDER, there is a straightforward way to do this. At the bottom of this page (http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/dynamic-stmt.htm), notice the predefined dynamics. You can use these dynamics on your ENTRY statement -- just be sure to declare them in your template. Then, if you specify a BY-group on PROC SGRENDER, the *BY* dynamics will automatically be populated. Let me know if this is what you were after.

Thanks!
Dan
asmits
Calcite | Level 5
Hi Dan,

This is *exactly* what I am after!

many thanks!
Alain
CherylMac
Obsidian | Level 7

This question/answer was posted some time ago (March 2010) and the website link offered as a solution is no longer working.  Is there a current link to the solution available?  Thanks!

djrisks
Barite | Level 11

Hi Cheryl,

 

The link does still work for me.

 

After I copied it into my browser, I landed on the website below.

 

http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#dynamic-stmt.ht...

 

If you still have any questions, about Dynamic Entry statements, please ask.

CherylMac
Obsidian | Level 7

Thanks!  I tried copying/pasting the URL multiple times but I must have missed something.  Your link works for me.

 

My template has the dynamic __BYLINE__ statement along with some simple text EntryTitles followed by this line which was created by TMPLOUT.

 

 

EntryTitle __BYLINE__ / textattrs=(size=GraphLabelText:fontsize);

 

When I run the SGRENDER code I do get the BY variable at the top of the page but I was hoping I could get the BY variable printing below the other EntryTitles just above the plot. Is that possible? 

djrisks
Barite | Level 11

That's fine!

 

Instead of "EntryTitle", you can try using "Entry" instead. This should place the dynamic by variable below the other titles.

 

If that doesn't help, you can try to use the padding option with top in EntryTitle, to push the titles lower. 

Otherwise could try putting all the EntryTitles in a Gridded layout with "n" rows, so that they are in different rows.

 

Just thinking out loud, hopefully one of the methods are useful.

CherylMac
Obsidian | Level 7

Thanks for the multiple options.  I'll give them a try.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 7 replies
  • 1269 views
  • 0 likes
  • 4 in conversation