Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Unanswered: compute sum label

    Heya,
    I have a small report I am having problem with. I am computing the sum of a few columns break on report and I want a custom LABEL 'TOTAL' to appear on the third column at then end of the report in the same row as the SUM. But by default the COMPUTE on REPORT prints the label on the first column. Including blank spaces on the LABEL does not work as the LABEL is truncated off when it exceeds the column width.

    Code ---

    compute sum label ' Total' of forfeit_1 forfeit_2 forfeit_3 forfeit_4 forfeit_5 on report

    SPOOL sn_outlet.txt

    CLEAR COLUMNS
    COLUMN outlet HEADING 'OUTLET'
    COLUMN channel HEADING 'CHANNEL'
    COLUMN ch_name HEADING 'OUTLET_NAME'
    COLUMN forfeit_1 FORMAT 99999999.99 HEADING 'SIM TYPE 1 - 2'
    COLUMN forfeit_2 FORMAT 99999999.99 HEADING 'SIM TYPE 3'
    COLUMN forfeit_3 FORMAT 99999999.99 HEADING 'SIM TYPE 4'
    COLUMN forfeit_4 FORMAT 99999999.99 HEADING 'SIM TYPE 5'
    COLUMN forfeit_5 FORMAT 99999999.99 HEADING 'SIM TYPE 6'
    COLUMN sim_total FORMAT 9999999999.99 HEADING 'TOTAL'

    TTITLE left 'PPS Forfeit Values due to card EXPIRE on - by Outlet'

    SELECT SOL_NO OUTLET,
    SOL_SALES_CHANNEL CHANNEL,
    SOL_SALES_OUTLET_NAME CH_NAME,
    SUM(AMOUNT_1) FORFEIT_1,
    SUM(AMOUNT_2) FORFEIT_2,
    SUM(AMOUNT_3) FORFEIT_3,
    SUM(AMOUNT_4) FORFEIT_4,
    SUM(AMOUNT_5) FORFEIT_5,
    SUM(TOTAL) SIM_TOTAL
    FROM FORFEIT_TMP
    WHERE REP_CODE LIKE '_.1'
    GROUP BY SOL_NO, SOL_SALES_CHANNEL, SOL_SALES_OUTLET_NAME
    ORDER BY SOL_NO
    /

    Report --
    PPS Forfeit Values due to card EXPIRE on - by Outlet
    OUT C OUTLET_NAME SIM TYPE 1 - 2 SIM TYPE 3
    --- - ------------------------------ -------------- ------------
    123 Y ADTG 1936.00
    310 D CORPORATE SALES 278.80 .00
    879 X SHATIN PLAZA II 1284.73 261.10
    880 X CHUNG ON STREET
    -------------- ------------
    To 248952.74 113133.10

    NOTE: ' TOTAL' gets truncated to ' TO' .. i have truncated column 4-5 and 6 for easy reference.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: compute sum label

    The length of the label is constrained by the size of the OUTLET column. I believe your only option is to increase the width of that column.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •