Data visualization with SAS programming

ENTRY statement and BY variables in GTL

Reply
Occasional Contributor
Posts: 19

ENTRY statement and BY variables in GTL

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
SAS Super FREQ
Posts: 864

Re: ENTRY statement and BY variables in GTL

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
Occasional Contributor
Posts: 19

Re: ENTRY statement and BY variables in GTL

Hi Dan,

This is *exactly* what I am after!

many thanks!
Alain
Occasional Contributor
Posts: 12

Re: ENTRY statement and BY variables in GTL

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!

Super Contributor
Posts: 252

Re: ENTRY statement and BY variables in GTL

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.

Occasional Contributor
Posts: 12

Re: ENTRY statement and BY variables in GTL

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? 

Super Contributor
Posts: 252

Re: ENTRY statement and BY variables in GTL

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.

Occasional Contributor
Posts: 12

Re: ENTRY statement and BY variables in GTL

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

Post a Question
Discussion Stats
  • 7 replies
  • 248 views
  • 0 likes
  • 4 in conversation