I’m trying to get a three page report produced with PROC TABULATE to look the same across the three pages. In particular there is one column that has all missing values on the middle page and I would like that column to have blank space, about the same width as the text that the formatted value of the numeric value in that column has on the other two pages. What I want is a uniform option like in PROC PRINT.
The closest I’ve come is to define my user format like this:
0 = '(0 or Missing) to 25 cm²'
1 = '>25 to 81 cm² '
2 = '>81 cm² '
3 = '34.0 <- 37.6 °C (^ Gr)'
4 = '37.7 <- 38.6 °C (Gr 1)'
5 = '38.7 <- 39.3 °C (Gr 2)'
6 = '39.4 <- 40.5 °C (Gr 3)'
7 = '40.6 <- high °C (Gr 4)'
. = '...................................'
/* the line above is actually a period, several blanks and another period */
This sort of works but leaves a row of periods on each side of the column. What I’ve been looking for is some way to put a blank field in the column of missing values so that PROC TABULATE will not collapse it to a 0 or 1 character width.
Or any other suggestion you might have.
I'm off for the weekend, so I'll check in on Tuesday.
You did not say whether you were sending your PROC TABULATE output to the LISTING window or to an ODS DESTINATION (like HTML, RTF, or PDF).
However, one thing to check: are you using all the TABULATE options related to treatment of missing values? These are all clipped from the documentation:
"MISSTEXT= supplies up to 256 characters of text to print and specifies a style element for table cells that contain missing values.
PRINTMISS prints all values that occur for a class variable each time headings for that variable are printed, even if there are no data for some of the cells that these headings create. Consequently, PRINTMISS creates row and column headings that are the same for all logical pages of the table, within a single BY group
PRELOADFMT specifies that all formats are preloaded for the class variables. PRELOADFMT has no effect unless you specify EXCLUSIVE, ORDER=DATA, or PRINTMISS and you assign formats to the class variables. If you specify PRELOADFMT without also specifying EXCLUSIVE, ORDER=DATA, or PRINTMISS, then SAS writes a warning message to the SAS log. Interaction: To limit PROC TABULATE output to the combinations of formatted class variable values present in the input data set, use the EXCLUSIVE option in the CLASS statement. Interaction: To include all ranges and values of the user-defined formats in the output, use the PRINTMISS option in the TABLE statement. Note: Use care when you use PRELOADFMT with PRINTMISS. This feature creates all possible combinations of formatted class variables. Some of these combinations may not make sense.
MISSING (in PROC TABULATE stmt) Consider missing values as valid values for class variables "
You would use them together like this:[pre]
proc tabulate data=whatever missing f=12.2;
class koala/ preloadfmt;
misstext='Not Applicable' printmiss;
format koala $afmt.;
(The above assumes that you have a format called $afmt. that is going to be preloaded for the class variable KOALA and that some of the crossings for KOALA may have missing values.)
In the LISTING destination, a combination of RTS (row title space) and Format= will be used to determine the width of the cells allocated to the data table (by default 1/4 of the Linesize goes to RTS and 3/4 of the Linesize goes to build the data table). Usually, every time I have used MISSING and PRINTMISS and PRELOADFMT to send my output to the LISTING/Output window, all the table cells are the same width, even across pages. Possibly, if you had ROW=FLOAT in your table, you could have been suppressing blank row headers, but it's hard to guess what's happening by just looking at your PROC FORMAT and in your post, you seemed to be talking about column headers, not row headers.
You may get a faster answer if you went straight to Tech Support. To get more help, you'd have to post your PROC TABULATE code, including ODS statments.