BookmarkSubscribeRSS Feed
Jannet
Obsidian | Level 7

I want to change the line (_____________) under the heading of the table to dotted line (---------) under the heading of the table in proc report step. I tried using options formchar still its not working for me.

 

@Kurt_Bremser 

8 REPLIES 8
WarrenKuhfeld
Rhodochrosite | Level 12

Are you using formchar with the listing destination? I never tried it, but I doubt if it has any effect outside that destination.

ballardw
Super User

Please post your code, both the Proc Report and how you set the Formchar.

 

And if you are sending this to any other ODS destination other than Listing it will not be used.

From the documentation of proc report and the Formchar option:

Restriction This option affects only the LISTING output. It has no affect on other ODS output.

 

Jannet
Obsidian | Level 7
Hi @ballardw, can i send the codes in private message to you?
SASKiwi
PROC Star

@Jannet  - Just add your code to this post using the insert SAS code icon (the running man).

Jannet
Obsidian | Level 7
proc template;  
  %** Courier 9pt **;
   define style Styles.ods_9pt;
        parent=styles.rtf;
        replace fonts/
          'TitleFont2' = ("Courier New",9pt,Bold )         
          'TitleFont' = ("Courier New",9pt,Bold )          
          'FootnoteFont' = ("Courier New",9pt )       
          'StrongFont' = ("Courier New",9pt )         
          'EmphasisFont' = ("Courier New",9pt )
          'FixedEmphasisFont' = ("Courier New",9pt )
          'FixedStrongFont' = ("Courier New",9pt)
          'FixedHeadingFont' = ("Courier New",9pt, Bold)
          'BatchFixedFont' = ("Courier New",9pt,Bold )
          'FixedFont' = ("Courier New",9pt )
          'headingEmphasisFont' = ("Courier New",9pt,Bold )
          'headingFont' = ("Courier New",9pt,Bold )        
          'docFont' = ("Courier New",9pt );
	     replace document from container	/	
          asis = on
          protectspecialchars=off;
        replace SystemFooter from TitlesAndFooters /
          asis = on
          protectspecialchars = on
          font= Fonts('FootnoteFont');         
	     replace systemtitle from titlesandfooters/
          asis = on
          protectspecialchars=off;   
	     replace body from document	/	
		    asis = on; 
        replace color_list
          "Colors used in the default style" /
          'link'= blue
          'bgH'= white
          'fg' = black
          'bg' = white;         
        replace Table from output /
          Background=_UNDEF_                                                
          cellpadding = 0pt   
          Rules=groups
          Frame=void;
        style Header from Header /
          Background=_undef_;
        style Rowheader from Rowheader /
          Background=_undef_;
        replace pageno from titlesandfooters/
          Foreground=white;
   end;
   
ods listing;  
options papersize='LETTER' orientation=landscape topmargin = '3.61cm' bottommargin = '3.61cm' 
        leftmargin = '2.54cm' rightmargin = '2.54cm' nodate nonumber missing=.;
ods rtf file="/home/u000000/sasuser.v94/Listings/listing_Demo.rtf" style=styles.ods_9pt nogtitle nogfootnote;
ods escapechar = '~';
options formchar='|_---|+|---+=|-/\<>*'
options validvarname=any;
options pageno=1;
proc report data=newb nowd headline headskip split='*';
	column num mypage TRT01A SITE BRTHDTC AGE SEX ETHNIC HEIGHTBL WEIGHTBL;
	define num/ noprint;
	*break after num/skip;
	define mypage /order noprint; 
	break after mypage / page; 
	define TRT01A/'Treatment' order descending center style(column)={width=1in};
	define SITE/'Site Id.*Unique Subject Id.' center style(column)={width=1in};
	define BRTHDTC/'Date of*Birth' center style(column)={width=1in};
	define AGE/'Age (YEARS)*[1]' center style(column)={width=1in};
	define SEX/'Sex' center style(column)={width=1in};
	define ETHNIC/'Ethnicity' center style(column)={width=1in};
	define HEIGHTBL/'Height*(cm)' center style(column)={width=1in};
	define WEIGHTBL/'Weight*(kg)'center style(column)={width=1in};
	*compute after TRT01A;
	*line '';
	*endcomp;
    title1 j=l height=10pt font="Courier New" "Protocol: XXX" ;
    title3 j=l height=10pt font="Courier New" "Population :XXX" j=r 'Page ^{​​​​​​​thispage}​​​​​​​ of ^{​​​​​​​lastpage}​​​​​​​';
    title4;
    title5 j=c height=10pt font="Courier New" "Listing";
    title6 j=c height=10pt font="Courier New" "Listing of Demographic Characteristics";
    title7;
    footnote1 j = l height=10pt font="Courier New" "20NOV2020 10:42";
 run;
ods rtf close;
ods listing;
Jannet
Obsidian | Level 7
@SASKiwi @ballardw @Kurt_Bremser : can you please check the code and let me know what mistake i am doing?
ballardw
Super User

There is no way to test the code without data that matches your data set.

 

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 8 replies
  • 683 views
  • 0 likes
  • 4 in conversation