Please find the screen shot and clarify me
in attachment statistic column data split into two page for weight i need all statistic in one page how i can do
Please supply example data and your code. Post example data in a data step with datalines, see my footnotes for advice.
Please find the below screen shot and my data in below formate
Sorry, but I don't have the time to type data off a picture. Read my previous post again.
Sorry, please find below code for the same
data ned;
length parameter $15. stats $10. DrugA $5. DrugB $5. total $5.;
input parameter stats DrugA DrugB total ;
datalines;
Age(years) Maximum 48 42 48
Age(years) Mean 33.5 28.93 31.29
Age(years) Median 35 29 32
Age(years) Minimum 22 21 21
Age(years) Q1 25.5 23 24
Age(years) Q3 39 33 36
Age(years) SD 7.581 5.75 7.039
Age(years) n 16 15 31
Height(cm) Maximum 173 173 173
Height(cm) Mean 166.81 167.4 167.1
Height(cm) Median 167 167 167
Height(cm) Minimum 159 161 159
Height(cm) Q1 164.5 165 165
Height(cm) Q3 169.5 171 170
Height(cm) SD 3.371 3.602 3.439
Height(cm) n 16 15 31
Weight(kg) Maximum 78 79.5 79.5
Weight(kg) Mean 68.7 68.07 68.4
Weight(kg) Median 69.4 68.3 69
Weight(kg) Minimum 54.1 51.6 51.6
Weight(kg) Q1 65.53 64 64.75
Weight(kg) Q3 74.5 72.4 74
Weight(kg) SD 6.872 6.945 6.799
Weight(kg) n 16 15 31
;
run;
That is not the dataset you use in the proc report.
Please find my code below i am using proc report to generate rtf file
proc report data= derived.&derive. nowd split='*' headskip headline missing style(column)=[vjust=center ];
column ORPRM CAT ordst STATS T_DRUG R1_DRUG TOTAL_DRUG;
define ORPRM /noprint order order = internal ;
define CAT / "Variable/* Category " order=data style=[asis=on just=left cellwidth=.8cm ] left order order ;
define ordst /noprint order ;
define STATS / "Statistics" style=[just=left cellwidth=.5cm ] left ;
define T_DRUG / "T*(N=&NT.)" order=data style=[just=center cellwidth=.5cm ] left order ;
define R1_DRUG / "R1*(N=&NR.)" style=[just=center cellwidth=.5cm ] left ;
define TOTAL_DRUG / "Total*(N=&NTot.)" order=data style=[just=center cellwidth=.5cm ] left order ;
compute CAT;
if CAT in ("Ethnicity/Race","BMI(kg/m^{super 2})","Age (years)" "Height (cm)" "Weight (kg)") then
call define(_col_, "style", "style=[font_weight=bold]");
endcomp;
compute after ORPRM;
line @1 "";
endcomp;
compute after / style=[borderbottomcolor=black bordertopwidth=2];
line "";
endcomp;
run;
ods _all_ close;
Hi:
Even if I read in your data set, and create a file, your data has these variables:
parameter stats DrugA DrugB total
and your PROC REPORT code has these variables:
ORPRM CAT ordst STATS T_DRUG R1_DRUG TOTAL_DRUG
The ONLY variable name that is the same is STATS. How do you get from your original dataset to the DATA=derived.&derive?? How do ORPRM CAT ORDST T_DRUG R1_DRUG and TOTAL_DRUG get created????
You don't show how to generate the data you're using with PROC REPORT....therefore, no one can run your code unless they guess what you're doing to get from the initial data you posted to the PROC REPORT data you show.
Also, you say you want ODS RTF, but you don't show any ODS RTF statements. No one can see your options. And, you use options like HEADLINE and HEADSKIP that are LISTING only options which will be ignored by RTF.
In order to help us help you, you need to either post ALL your code or if you can't post ALL your code, then you should open a track with Tech Support and work this with them.
Cynthia
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!
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.