Hi,
I am working on PROC REPORT with across statement.
I'd like to insert a blank row after each group which is defined by var3.
Finally, I want to get a table in 1.png
Below is my proc report code:
proc report data=mydata nocenter missing headline headskip split="\" spacing=0 FORMCHAR='|_---|+|---+=|-/\<>*' nowindows;
column var4 var3 var2,var1,var5,var6 dummy;
define var4/group order=data left flow width=8 "name" id;
define var3/ group noprint;
define var2/'' across order=data ;
define var1/'' across order=data ;
define var5/ '' across order=data ;
define var6/'' display left width=6;
define dummy/ noprint;
compute dummy;
dummy = 1;
endcomp;
break after var3/ skip;
compute before _page_;
line "_";
endcomp;
compute after _page_;
line "_";
endcomp;
run;
But what I can get are in part1.png and part2.png
Now, I have 2 questions:
1, why there is no blank row was inserted into the output?
2, how to control the blank row to show the output in 1.png? The skip break should depend on var3 instead of var4.
PNGs are in the zip file.
Thanks very much!
Data was attached here. Thanks!
If you want to post images so that users can see your issue use the Photos icon in the editor tool bar. Most users will not want to download files.
Hello,
Many people here can't open your attachments because of the restrictions they have. Please try to provide your data in the form of a data step and any images can be directly inserted here.
Check this how to add a line after a group;
proc report data=sashelp.cars(obs=50);
column make invoice msrp pct;
define make / group;
define pct / computed format=percent8.2 'PCT';
compute pct;
pct = invoice.sum / msrp.sum;
endcomp;
compute after make;
line ' ';
endcomp;
run;
Above is what I want to get.
Below is how the outputs looks like.
Hi guys,
Thanks for your comments
Now, I got the answer which is simple.
VAR3 should be defined before VAR4!
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.