BookmarkSubscribeRSS Feed
yogita_patel
Calcite | Level 5

Hi i would like to generate report header like below

yogita_patel_0-1650381625526.png

 

where i want analysis visit and summary statistic in second column which are which are column header for first two columns 

7 REPLIES 7
yogita_patel
Calcite | Level 5

proc report data=final nowd headskip headline split='*'
style = {outputwidth=100% } spacing=1 wrap;
by order param;
column avisitn avisit newvar _1 _2 _3 _4;
define avisitn/ noprint;
define avisit/ group order=data 'Analysis * Visit' center;
define newvar/ display 'Summary * Statistics' center;
define _1/display "Placebo * (N=&n1)" center;
define _2/display "Tanezumab 5 * mg * (N=&n2)" center;
define _3/display "Tanezumab 10 * mg * (N=&n3)" center;
define _4/display "Naproxen 500 * mg BID * (N=&n4)" center;
compute after avisit;
line '';
endcomp;

run;

yogita_patel
Calcite | Level 5

cant upload whole data as it is big dataset with more than 22000 obs

 

Kurt_Bremser
Super User

We just need a few lines of data step code so we get a clear picture of your dataset structure (variable types, lengths, formats), some representative values, and how the report from this should look.

PaigeMiller
Diamond | Level 26

Not a direct answer to your question, but you might want to try the %TABLEN macro, which produces reports like yours.

--
Paige Miller
Cynthia_sas
SAS Super FREQ
Hi:
This is the kind of report you can generate using PROC REPORT. Since you did not post any data or any of your sample code, you might want to look in this paper for some ideas: https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/173-2008.pdf -- there are 3 different types of demographic report in this paper. They don't look exactly like what you want, but they should provide some ideas.
Cynthia
tarheel13
Rhodochrosite | Level 12

it looks like you would need to use split character. also the header N were most likely created with macro variables. 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 7 replies
  • 930 views
  • 1 like
  • 5 in conversation