BookmarkSubscribeRSS Feed
raja777pharma
Fluorite | Level 6

Hello Team,
I am struggling to generate RTF as per below screen shot, My output is not coming as Group for COL1,COL2, and need to put blank line between (Break) COl1 after value 'Observed ' and 'Changed'
Note : The data should be in sort order of vars – ‘gpxpage paramn avisitn catno’
In Below screen shot have more columns , but in my out put column are restricted and will come next RTF page
I have attached the data set and same data set in excel sheet.
I need output like below :

raja777pharma_0-1585825491359.png

 

My Current code and Output as below:

 

data report;
set table;
    if _n_ < 25 then gpxpage=1;
	  else gpxpage=2;
run;

title;
%prctmplt;
%ttlmaker;
ods listing close;
ods &outype file="%sysfunc(pathname(out))\&outname2..&outype" style=acrsstyle ;
run;
ods escapechar = '^';

proc Report data=report split='^' missing nowd spanrows headline headskip ;
	column gpxpage paramn avisitn catno col1 col2 col3 col4 col5 col6 col7  ;
	define gpxpage	/order order=internal "" noprint;
	define paramn	/order order=internal "" noprint;
	define avisitn /order order=internal "" noprint;
    define catno /order order=internal "" noprint;

	define col1 /&Header  group style(column)=[cellwidth=1.2in font_face=Courier font_size=1.25just=l asis=on] style(hdr)=[just=l asis=on] flow;
    define col2 /"Parameter"  group style(column)=[cellwidth=0.8in font_face=Courier font_size=1.25just=l asis=on] style(hdr)=[just=l asis=on] flow;
    define col3 /"Statistics"   style(column)=[cellwidth=0.9in font_face=Courier font_size=1.25just=l asis=on] style(hdr)=[just=l asis=on] flow;
	define col4 /&Header1.   style(column)=[cellwidth=1in	font_face=Courier font_size=1.25just=c asis=on] style(hdr)=[just=c asis=on];
	define col5 /&Header2.  style(column)=[cellwidth=1in font_face=Courier font_size=1.25just=c asis=on] style(hdr)=[just=c asis=on];
    define col6 /&Header3.  style(column)=[cellwidth=1in font_face=Courier font_size=1.25just=c asis=on] style(hdr)=[just=c asis=on];
    define col7 /&Header99.  style(column)=[cellwidth=1in font_face=Courier font_size=1.25just=c asis=on] style(hdr)=[just=c asis=on];

	break after gpxpage / page;

	compute before gpxpage;
        line " ";
    endcomp;

run;

My data set attached

 

1 REPLY 1
Cynthia_sas
SAS Super FREQ
HI:
No need to post the same question in 2 different forums. This was also asked and answered here: https://communities.sas.com/t5/SAS-Programming/Proc-report-RTF-Grouping-and-Break/td-p/636828

Cynthia

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 497 views
  • 0 likes
  • 2 in conversation