BookmarkSubscribeRSS Feed
cov_derek
Fluorite | Level 6


Hi everyone,

I'm having a problem involving a spanning header. I want to produce a spanning header with "text1 text2" on the left side of the page, and then "text3" at the right side of the page.

Here's my COLUMNS statement:

COLUMNS ("~{style [fontstyle=italic just=l] text1} text2 ~{style [just=r] text 3}" c1 c2 c3 c4 c5);

It is left-justified, with text1 in italics and text2 in regular, but text3 follows immediately after As far as I can tell, the second JUST doesn't work. The in-line directive works (replace JUST=R with COLOR=RED and text3 turns red), but not with JUST. Is this a spanning header issue where the width of the table can't be determined in time to apply formatting?

Thanks,

Derek

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  I think there are some attributes that PDF won't change in "midstream" or "mid-cell". You'd have to check with Tech Support to verify that. However, you could just split up the header so that text1 and text2 are above the first 3 columns and then text 3 is above the last 2 columns and if you split the spanning header into 2 cells, each cell can have different justification. See the attached screen shot. Program below.

  If that won't work with you, then I recommend that you work with Tech Support.

cynthia

ods pdf file='c:\temp\just.pdf' style=printer notoc;

ods escapechar='~';

  proc report data=sashelp.class nowd;

    COLUMNS ("~{style [fontstyle=italic just=l] text1 text2}" name age sex )

            ("~{style [just=r] text 3}"  height weight);

  run;

ods pdf close;


just_in_span_hdr.png
cov_derek
Fluorite | Level 6

Thank you, Cynthia. Hope y'all are safe and warm.

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
  • 2 replies
  • 1390 views
  • 3 likes
  • 2 in conversation