BookmarkSubscribeRSS Feed
Kya_wwwwww
Calcite | Level 5

Dear users,

How can I make my table show like the picture below?

aa.PNG

I want a line above the whole table but the line is not a title, I use the "line @1"  statement, but my output is like this way

org.PNG

Thx you for answering my question!!!!!!!!A lot!!!!!!!!!!!!!

4 REPLIES 4
ballardw
Super User

Please post the code that are using so far. Please post the code into a code box opened on the forum using the {I} or "running man" icons to preserve formatting.

 

 

Also you should tell us what ODS style you are currently using for your output.

Kya_wwwwww
Calcite | Level 5

Oh I'm sorry and thx for your reminding, below is my template and proc report code

proc template;
    define style rtfstyle;
    parent=styles.rtf;
    style fonts / 'TitleFont' = ("Courier New", 8pt, Bold) 
    'TitleFont2' = ("Courier New", 8pt, Bold)
    'StrongFont' = ("Courier New", 8pt, Bold) 
    'headingFont' = ("Courier New", 8pt, Bold) 
    'docFont' = ("Courier New", 8pt, Bold)
    'footFont' = ("Courier New", 8pt, Bold) 
    'FixedStrongFont' = ("Courier New", 8pt, Bold)
    'FixedHeadingFont' = ("Courier New", 8pt, Bold)
    'FixedFont' = ("Courier New", 8pt, Bold) 
    'BatchFixedFont' = ("Courier New", 8pt, Bold)
    'FixedEmphasisFont' = ("Courier New", 8pt, Bold)
    'EmphasisFont' = ("Courier New", 8pt, Bold);
    style Table from Output / bordercollapse = separate rules = none cellpadding = 0pt cellspacing = 0pt borderspacing = 0pt bordertopwidth = 1pt borderbottomwidth = 0pt frame = void;
    style body from document / leftmargin = 1in rightmargin = 1in topmargin = 1.5in bottommargin = 1in;
    style cell from container / ;
    style header from header / background = _undef_ leftmargin=2pt;
    end;
run;


proc report nowd data=final(where=(paramcd="SPGA0")) split = '|' nowd headline headskip missing;
	column avisitn ord ord2 label  trt5
							 trt6  trt7 ;
	define avisitn	 / noprint order order=data ;
	define ord 		 / computed noprint order order=data ; 
	define ord2 	 / noprint order order=data ; 
	define label 	 / width=45 "By Pooled Dose"  flow style(column)=[width=39% asis=on JUST=L] style(header)={just=LEFT borderbottomwidth=1pt};
	define trt5 	 / width=18 "aaa|(N=%cmpres(&den5))" style(column)=[width=20% asis=on JUST=C] style(header)={just=center borderbottomwidth=1pt};
	define trt6     / width=18 "bbb|(N=%cmpres(&den6))" style(column)=[width=20% asis=on JUST=C] style(header)={just=center borderbottomwidth=1pt};
	define trt7     / width=18 "Total|(N=%cmpres(&den7))" style(column)=[width=20% asis=on JUST=C] style(header)={just=center borderbottomwidth=1pt};
	
	compute before _page_;
	line @1 "Parameter: sPGA(0)";
	endcomp;

      compute after ord;
  	  line " ";
  	  endcomp;
	break after avisitn/ page;
 run;
Tom
Super User Tom
Super User

Why not just use a TITLE statement for that title line? 

Kya_wwwwww
Calcite | Level 5

Because there will be a blank line between the title and the table.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 443 views
  • 0 likes
  • 3 in conversation