11-04-2014 11:51 PM
Hi, I had PROC REPORT with a few calculated vars in COMPUTE BEFORE block, but they displayed between data and row headings.
Then I changed to COMPUTE BEFORE _PAGE_. Now it displays where intended but the calculated values do not display.
What am I missing? (I've attached a file with a code excerpt and results).
Thanks you in anticipation..
11-05-2014 02:09 AM
this is the normal behavior of COMPUTE BEFORE and COMPUTE BEFORE _PAGE_
You can set the options "noheader" to the PROC REPORT statement and use the COMPUTE BEFORE
then you can list the column names by yourself in the line statement.
COMPUTE BEFORE ;
line 'Number of LL2@ flags: ' f2.sum;
line @1 'column one name' @20 'column two name' ... ;
line @1 5*'=';
line ' ';
11-05-2014 06:13 AM
It seems you can get those value before PAGE break , add out=xxxx option in proc report to see if it has already gotten the value.
Or you could try COMPUTE AFTER _PAGE_
11-05-2014 09:42 AM
There is really not enough information from your posted program to really give you constructive help. The usage of the (other variables) GROUP? ORDER? Do you really want the SUM of the date variables? So without ALL the code and some data to test, anyone who might want to help, has to factor in the time to guess about what you did not show, make guesses about the data and guess about what your (other variables) are. And, I see you're doing BY group processing too. Then, they have to make the data AND write the program.
It should be fairly easy for you to use SASHELP.PRDSALE or one of the other SASHELP datasets to mock up a sample program that illustrates your issue when it is run. That way, people don't have to guess about the (other variables) or the data. There is a date variable in the SASHELP.PRDSALE dataset. You only need 1 date variable and 1 other numeric variable (you could use quarter) for your COMPUTE block in a sample program. Or you could make a small data set from your real data of just 2 by groups with only a few obs in each by group.