it's possible to create proc report ?
data three;
infile datalines;
input a $ b $ x $ y $ z $ m $;
return;
datalines;
AA 21 22 23 24 25
AB 26 27 28 29 30
;
run;
First is output on my query and second table i want .
Hi:
Rather than running 2 PROC REPORTS, my tendency would be to create 1 table from the original WORK.THREE dataset, as shown below:
Of course I'm not sure I understand the original data anyway or why red and blue are the same for both sections but green and black are different. But anyway, this is my take on it.
cynthia
Explain how the original data is converted to this report. Don't make us guess. You know the logic used, tell us.
i want append two proc report
data three;
infile datalines;
input a $ b $ x $ y $ z $ m $;
return;
datalines;
AA 21 22 23 24 25
AB 26 27 28 29 30
;
run;
data have;
set three;
group='color1';
group1='color2';
run;
proc report data=have ;
column group ('red' a) ('blue' b) ('green' x) ('black' y);
define group /group noprint;
Compute before group;
Line @1 group $50.;
endcomp;
run;
proc report data=have ;
column group1 ('red' a) ('blue' b) ('green' z) ('black' m);
define group1 /group noprint;
Compute before group1;
Line @1 group1 $50.;
endcomp;
run;
ods excel file='test.xlsx' options(sheet_interval='NONE');
proc report data=have ;
column group ('red' a) ('blue' b) ('green' x) ('black' y);
define group /group noprint;
Compute before group;
Line @1 group $50.;
endcomp;
run;
proc report data=have ;
column group1 ('red' a) ('blue' b) ('green' z) ('black' m);
define group1 /group noprint;
Compute before group1;
Line @1 group1 $50.;
endcomp;
run;
ods excel close;
I think you need re-organize your data .
It is impossible to get job done in one report.
Maybe @Cynthia_sas know something.
data three;
infile datalines;
input a $ b $ x $ y $ z $ m $;
return;
datalines;
AA 21 22 23 24 25
AB 26 27 28 29 30
;
run;
ods excel file='c:\temp\temp.xlsx' options(sheet_interval='none');
proc report data=three nowd;
define a/display;
define b/display id;
define z/display page;
run;
ods excel close;
Hi:
Rather than running 2 PROC REPORTS, my tendency would be to create 1 table from the original WORK.THREE dataset, as shown below:
Of course I'm not sure I understand the original data anyway or why red and blue are the same for both sections but green and black are different. But anyway, this is my take on it.
cynthia
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.