When using ODS listing we can create grouped headers like following,
Sex/Age/ Serum Pregnancy Test
Race* Date Result**
See the "serum pregnancy test" is at the same row as the 'Sex/age/'
If you do this in ODS RTF, it will become something like this:
Serum Pregnancy Test
Racea Date Result
See how the 'serum pregnancy test' and its underline is above 'sex/age/' row. Sometimes this make the output very ugly.
Is there any way to change this behavior to something like the first example? Appreciate your help.
Hi: This may not be an ODS RTF issue, so much as an issue with the Procedure that you're using. For example, PROC REPORT has some options that are supported in the LISTING destination, but are ignored in the HTML, PDF -and- RTF destinations. Same with PROC TABULATE.
What code/procedure are you using to create your report??? Can you duplicate the issue using the SASHELP.CLASS or SASHELP.SHOES data -- so you don't have to post your data to the forum? If so, folks are more able to help if you send the code that is in question.
Thank you so much for your prompt reply, here is the code that generates both lising-style output and rtf output using proc report. see the deffirence how the headers are alligned. Thanks a lot.
This is what I see from the LISTING output:
Region Product stores Sales Returns
Africa Boot 12 $29,761 $769
Africa Men's Casual 4 $67,242 $2,284
Africa Men's Dress 7 $76,793 $2,433
The word Revenue is on the same "line" with the word Number. The underline is on the same "line" with the word OF and Sales and Returns are on the same line with Stores. The UNDERSCORE line spans the -entire- column for sales and the -entire- column for returns. This is a feature specific to LISTING -- certain characters are consider 'repeating' characters and they cause that character to repeat for the width of what they span.
But that's the way that the LISTING window works with PROC REPORT. ODS RTF does not use "repeat" characters. So what I see in the ODS RTF output is that the line of underscores only appears underneath word 'REVENUE'. This is an apples versus oranges kind of thing. RTF is NOT LISTING. But I do see, in the RTF file, that the cell for REVENUE spans both the cells for SALES and RETURNS.
I would be tempted to abandon the LISTING technique. Writing a physical row of underscores takes up an extra line of space and, to me, doesn't look very nice. (But that's my opinion.)
In SAS 9.2, using the bordertopcolor and bordertopwidth attributes, I can change the border of SALES and RETURNS so the output has the -appearance- of being underlined (using style=journal, so you can see the underlining effect in Print Preview mode). Otherwise, you might have to use RTF control strings in your headers to get the underlining you want. In this instance, your best bet for help would be to work with Tech Support.
Cynthia, Thanks again for your detailed information. I guess I can use your method under certain circumstances, but not other. For example, if I have two groups of headers next to each other, the topborder will be connected together making it impossible to separate. Also, If I have too many variables like 'store' where I need to manually specify the text on top of the header, it will be troublesome.
I guess for now, I have to live with the fact that ODS RTF handle this differently.