BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Anita_n
Pyrite | Level 9

Dear all, 

I have being tring to remove the table outlines in proc tabulate without any success. 

When I use the the FORMCHAR= option statement it works in the result viewer but in the pdf destination

this doesn't show. Please any help.

 

If possible, I will like to remove all row and column outlines  or probably substitute this with short dashes maybe.

Here the code:

 

 

ods pdf file="mypath\test.pdf";
proc tabulate data=sashelp.cars format=6.0 style=[font_size=5pt just=c cellwidth=10 fontstyle=italic] formchar= '  ' noseps;
where make in ("Acura", "Audi", "BMW");
class make type origin / order=data style=[textalign=center ] missing;
  classlev make type origin/ style=[background=white font_weight=bold font_size=5pt foreground=dimgray cellpadding=0 ];
   var  MSRP /;
   table type*MSRP='' *sum='' ,
         make=''*origin='' / row=float nocontinued indent=3 rts=8  misstext=[label=" " ] style=[cellpadding=5]
         box=[label='Type ' style=[background=white foreground=dimgray font_weight=bold font_size=5pt ]];
run;

ods pdf close;

Thanks for any help

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
ods pdf file="c:\temp\test.pdf" style=journal;
proc tabulate data=sashelp.cars format=6.0 style=[font_size=5pt just=c cellwidth=10 fontstyle=italic  bordertopcolor=white  borderbottomcolor=white] formchar= '  ' noseps;
where make in ("Acura", "Audi", "BMW");
class make type origin / order=data style=[textalign=center bordertopcolor=white  borderbottomcolor=white] missing;
  classlev make type origin/ style=[background=white font_weight=bold font_size=5pt foreground=dimgray cellpadding=0  bordertopcolor=white  borderbottomcolor=white];
   var  MSRP /;
   table type*MSRP='' *sum='' ,
         make=''*origin='' / row=float nocontinued indent=3 rts=8  misstext=[label=" " ] style=[cellpadding=5]
         box=[label='Type ' style=[background=white foreground=dimgray font_weight=bold font_size=5pt  bordertopcolor=white  borderbottomcolor=white]];
run;

ods pdf close;

Ksharp_0-1665401700717.png

 

View solution in original post

6 REPLIES 6
Ksharp
Super User
ods pdf file="c:\temp\test.pdf" style=journal;
proc tabulate data=sashelp.cars format=6.0 style=[font_size=5pt just=c cellwidth=10 fontstyle=italic  bordertopcolor=white  borderbottomcolor=white] formchar= '  ' noseps;
where make in ("Acura", "Audi", "BMW");
class make type origin / order=data style=[textalign=center bordertopcolor=white  borderbottomcolor=white] missing;
  classlev make type origin/ style=[background=white font_weight=bold font_size=5pt foreground=dimgray cellpadding=0  bordertopcolor=white  borderbottomcolor=white];
   var  MSRP /;
   table type*MSRP='' *sum='' ,
         make=''*origin='' / row=float nocontinued indent=3 rts=8  misstext=[label=" " ] style=[cellpadding=5]
         box=[label='Type ' style=[background=white foreground=dimgray font_weight=bold font_size=5pt  bordertopcolor=white  borderbottomcolor=white]];
run;

ods pdf close;

Ksharp_0-1665401700717.png

 

Anita_n
Pyrite | Level 9
Is there also a way to use short dashes
Ksharp
Super User

Sorry. I can't help you. Maybe @Cynthia_sas  knew the solution.

style "BORDERBOTTOMSTYLE=" is only valid in Markup family, PowerPoint, Excel, RTF, and Measured RTF destinations,NOT pdf .

Ksharp_0-1665405391936.png

The following is from HTML:

Ksharp_1-1665405457243.png

ods pdf file="c:\temp\test.pdf" style=pearl;
proc tabulate data=sashelp.cars format=6.0 style=[font_size=5pt just=c cellwidth=10 fontstyle=italic   borderbottomstyle=dashed BORDERBOTTOMWIDTH=2] formchar= '  ' noseps;
where make in ("Acura", "Audi", "BMW");
class make type origin / order=data style=[textalign=center  borderbottomstyle=dashed  BORDERBOTTOMWIDTH=2] missing;
  classlev make type origin/ style=[background=white font_weight=bold font_size=5pt  cellpadding=0   borderbottomstyle=dashed  BORDERBOTTOMWIDTH=2];
   var  MSRP /;
   table type*MSRP='' *sum='' ,
         make=''*origin='' / row=float nocontinued indent=3 rts=8  misstext=[label=" " ] style=[cellpadding=5]
         box=[label='Type ' style=[background=white  font_weight=bold font_size=5pt   borderbottomstyle=dashed  BORDERBOTTOMWIDTH=2]];
run;

ods pdf close;
Cynthia_sas
Diamond | Level 26

Hi:

  One way to remove all the lines without changing the borders is to use the RULES and FRAME attributes as style overrides on the TABLE statement, as shown below:

Cynthia_sas_0-1665530417068.png

 

  You asked later about having the lines made up of short dashes, that harkens back to old LISTING style output. If find the dashes as borders to be very distracting. However, if you need/want to do that, then you'll need to move into the world of style overrides for the border settings. You'll have to look in the documentation though, I am not sure that PDF will support a line style of dashes for the borders; although RTF might.

 Cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 6 replies
  • 1400 views
  • 1 like
  • 3 in conversation