Desktop productivity for business analysts and programmers

Proc Report: Group Total label customisation

Posts: 0

Proc Report: Group Total label customisation


Check the output in url:

For code access url:

Check the Sub total label for each region.
Label is as 'TOTAL'
If we give the label as "Total for Region :" || region

Then is displays Total for Region : NC

But problem is that the total label wraps within that cell

I want to span the total label to the next cell and should not wrap within the cell nor the column width should increase.

Please help
Posts: 8,719

Re: Proc Report: Group Total label customisation

Your choices are to have the Group Break "live" within the width of the column it's in (as in the "Total" report line) or to have the customized line span the WHOLE table (as in the "NC Region -- Sales Need Improvement" line). Those are your choices.

There is no ability to have the "Total" cell merge with the cell next to it. If your customized text is not wide enough to fit the cell width, it will wrap. That cell width can be made wider for the WHOLE column, but since a TABLE is a TABLE is a TABLE -- with the same number of COLUMNS on every ROW (with the exception of LINE statement rows), you cannot merge the TOTAL cell in the REGION column with the CITYSIZE column next to it.

The exception is the LINE statement line. But, as you see, that LINE spans the WHOLE table. That is the way it works. In the LISTING destination, you may be able to place that LINE text so it "looks" like your text string is spanning both REGION AND CITYSIZE, but that look is achieved with the use of "print position" placement of text
[pre] LINE @5 'Total' @23 temptot; [/pre]
That kind of LINE statement only works for LISTING or OUTPUT WINDOW or ASCII text file output. But, that kind of LINE statement is also affected by the LINESIZE option and unless you use the same LINESIZE all the time, the placement from your LINE statement might not line up from data file to data file.

Also, remember that if you are returning reports to Web Report Studio in the BI platform, that LINE statement output does not currently get surfaced in the SASReport XML that WRS uses.

You seem to have a very particular need to have fixed column widths everywhere except the subtotal report row. Your best bet for help with this is to contact Tech Support. They can help you figure out the best technique, if possible, for your output destination of choice (HTML, LISTING). It's possible that you might get a slightly different look using PROC TABULATE, but there you do not thave the ability to put the region name in the TOTAL line.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation