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