PROC REPORT Question

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

PROC REPORT Question

Hi All

I am trying to create a report like this:

         AMOUNT CHANGE

       ---------------- -------------

        125,0000   134,0000

TOTAL

         125,000    134,000

I tried this code:

proc report.JPG

But it doesn't give me the desired result.

Can anyone help me with this? Basically I need sum of two fields and the total of the same with the key word total.

Thanks in advance!


Accepted Solutions
Solution
‎10-15-2013 02:47 PM
Super Contributor
Posts: 1,636

Re: PROC REPORT Question

example:

options ps=49 ls=79 nodate nonumber;
title;
footnote;
ods listing;
proc report data=sashelp.class nowd headline headskip;
column weight height;
define weight /analysis sum format=comma16.2 width=16 center;
define height /analysis sum format=comma16.2 center;
compute after;
  line @20 'Total';
  line @23 weight.sum comma16.2 +2 height.sum comma16.2;
endcomp;
run;

/* output */
                              Weight            Height
                    ________________________________

                              1,900.50          1,184.40
                   Total
                              1,900.50          1,184.40

View solution in original post


All Replies
Solution
‎10-15-2013 02:47 PM
Super Contributor
Posts: 1,636

Re: PROC REPORT Question

example:

options ps=49 ls=79 nodate nonumber;
title;
footnote;
ods listing;
proc report data=sashelp.class nowd headline headskip;
column weight height;
define weight /analysis sum format=comma16.2 width=16 center;
define height /analysis sum format=comma16.2 center;
compute after;
  line @20 'Total';
  line @23 weight.sum comma16.2 +2 height.sum comma16.2;
endcomp;
run;

/* output */
                              Weight            Height
                    ________________________________

                              1,900.50          1,184.40
                   Total
                              1,900.50          1,184.40

Contributor
Posts: 50

Re: PROC REPORT Question

Thank you!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 214 views
  • 0 likes
  • 2 in conversation