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

I’ve seen a lot permutations for titles with odd spacing in SAS graphics.  The current one that I am trying to work around is for SGPanel.

I am creating a dynamic title that ends up displayed as

     Trend in Fall Enrollment Headcounnt for

By Location         then Gender

title1 "Trend in &term Enrollment Headcount for &prefixLong";

  title2 "by &reportTyName1 then &reportTyName2";

  proc sgpanel data=enrollment;

  panelby &reportTy1 &reportTy2/ layout=lattice uniscale=column  novarname  columns=3;

  vbar academic_period_desc / response=students_enrolled datalabel /*group=&enrRepTyRank*/ /*legendlabel=none*/ nostatlabel legendlabel=' ';

  rowaxis display=(nolabel);

  colaxis display=(nolable);

  /*title  "Trend in &term Enrollment Headcount for&prefixLong by &reportTyName1 then &reportTyName2";

I also tried using the title command in the sgpanel.

*/

  run;

When I use it with a tabulate statement the title shows up correctly.

title1 "Trend in &term Enrollment Headcount for &prefixLong";

  title2 "by &reportTyName1 then &reportTyName2";

  PROC TABULATE missing FORMAT=COMMA8.

  data=enrollment;

  &whereClause;

  class &reportTy1 &reportTy2 academic_period_desc;

  var STUDENTS_ENROLLED;

  TABLES &reportTy1=' ' * (&reportTy2=' ' all= 'Sub-total') all='Total',

  academic_period_desc=' '*Students_Enrolled=' '*sum=' '  /row=float;

  KEYLABEL n=' ' Sum= ' ';

  run;

Since the spacing is not off in one case and is in the other I know that I do not have extra spaces in my variables.

1 ACCEPTED SOLUTION

Accepted Solutions
DavidPhillips2
Rhodochrosite | Level 12

I recalled that this was answered in another post.  Sorry for posting the same question
twice.  When using an insert into
statement in SAS 9.2 you have to use the separated by ‘ ‘ in the proc sql
statement.

View solution in original post

2 REPLIES 2
ballardw
Super User

Please describe how the "spacing is off", preferably a posted graphic. Destination?

And I believe you are using SAS 9.3, is that correct?

DavidPhillips2
Rhodochrosite | Level 12

I recalled that this was answered in another post.  Sorry for posting the same question
twice.  When using an insert into
statement in SAS 9.2 you have to use the separated by ‘ ‘ in the proc sql
statement.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 753 views
  • 0 likes
  • 2 in conversation