The SAS Output Delivery System and reporting techniques

Proc Report summary statisistics

Reply
Occasional Contributor
Posts: 6

Proc Report summary statisistics

Hi There

 

i am facing issue in the report in rtf file, i need to generate rtf file with 6 column (Col1.....col6);

col1 values should split into 2 lines and reset of the col2-col6 values need to alien from  2nd line, can any one help me on this.

 

col1 is a order variable.             

 

My RTF report need to look like this.

 

col1               col2      col3    col4   col5   col6

xyz...(line1)         ****need space ******

.......(line2)    xxx       xxx      xxx     xxx     xxx

abc               xxx       xxx      xxx     xxx     xxx

 

Thanks 

Respected Advisor
Posts: 2,647

Re: Proc Report summary statisistics

[ Edited ]

vikram_e wrote:

Hi There

 

i am facing issue in the report in rtf file, i need to generate rtf file with 6 column (Col1.....col6);

col1 values should split into 2 lines and reset of the col2-col6 values need to alien from  2nd line, can any one help me on this.

 

col1 is a order variable.             

 

My RTF report need to look like this.

 

col1               col2      col3    col4   col5   col6

xyz...(line1)         ****need space ******

.......(line2)    xxx       xxx      xxx     xxx     xxx

abc               xxx       xxx      xxx     xxx     xxx

 

Thanks 


Of course, it would be very helpful to see some sample data.

It would also be very helpful if you could explain

 

xyz...(line1)

.........(line2)

 

as this means nothing to me. 

 

My general approach to this is to use PROC SUMMARY to obtain the proper statistics and a data step (if necessary) to create the proper rows (with a blank row that you obviously want), and then you can use PROC REPORT or even PROC PRINT to get the output to appear the way you want.

--
Paige Miller
SAS Super FREQ
Posts: 806

Re: Proc Report summary statisistics

If you need to wrap some data content, you can use inline formatting, see ODS ESCAPECHAR= for more information.

 

Here is an example using this technique, the "<br>" is replace with the inline formatting function for a newline. Please make sure the variable used is wide enough to accommodate the inline formatting functions. 

 

data have;
  infile cards dlm=",";
  input
    col1 : $64.
    col2
    col3
    col4
    col5
    col6
  ;
  col1N = tranwrd(col1, "<br>", "^{newline}");
cards;
xyz(line1)<br>(line2),1,2,3,4,5
xyzabc,10,20,30,40,50
;

ods escapechar="^";
proc report data=have;
  column col1n col2-col6;
  define col2 - col6 / style={ just=r vjust=bottom};
run;
Ask a Question
Discussion stats
  • 2 replies
  • 132 views
  • 0 likes
  • 3 in conversation