Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem getting label with compute

Re: Problem getting label with compute

From: <made_in_usa_at_my-dejanews.com>
Date: Wed, 17 Mar 1999 18:34:20 GMT
Message-ID: <7cosjb$rsu$1@nnrp1.dejanews.com>


I am using 8.0.5, and things are working. I have included a small example below that is working for me. I wonder if you might be having trouble because you are using 'of Platform on Platform'. Look at the example. Are you aliasing the count(*) and using that in your compute statement? So that your statement is 'of aliased_value on real_column' where aliased_value is the aliased count(*) and the real_column is the column that you are breaking on.

Also, note that when using that label parameter that it will truncate the label at the size of the column you are breaking on. This means that if I don't put a format on COLUMN1 (the size of this column is VARCHAR2(10)) as shown below, then my label shows up as 'Grand Tota'. Hope this helps.

Example:

column current_date NEW_VALUE _date NOPRINT column rpt_period new_value _rpt_period noprint

column COLUMN1 format a15
column records_processed format 999999 heading 'Recs|Procd' column total_amount format 9999999.99 heading 'Total|Amount'

clear breaks
clear computes

break on COLUMN1 skip page on COLUMN2 skip 1 on report skip page compute count label 'Subtotal' of records_processed on COLUMN2 compute count label 'Subtotal' of total_amount on COLUMN2

compute sum label 'Grand Total' of records_processed on COLUMN1 compute sum label 'Grand Total' of total_amount on COLUMN1

TTITLE CENTER 'Test Report' SKIP 1 -
  center 'Running for: ' _rpt_period skip 1 -   left 'Report date: ' _date -
  right 'Page: ' format 999 sql.pno skip 1

  SELECT COLUMN1,

         TO_CHAR(sysdate,'DD-Mon-YYYY') current_date,
         TO_CHAR(sysdate-6,'DD-Mon-YYYY')||' To
         '||TO_CHAR(sysdate,'DD-Mon-YYYY') rpt_period,
         COLUMN2,
         COUNT(*) records_processed,
         SUM(COLUMN3) total_amount

    FROM TABLE1
GROUP BY COLUMN1,
         COLUMN2
         ;


In article <7bcpvi$ccr$1_at_nnrp1.dejanews.com>,   chrisoc_at_ans.net wrote:
>
>
> I'm having no luck getting labels to print on my compute results.
>
> I'm doing the break on column and the order by and group
> by are working,
> and the counts, averages are in fact computing -- the numbers
> are fine.
>
> SQL*Plus is v. 8.0.4.0.0
>
> I'm issuing "compute count label 'Count' of Platform on Platform"
>
> (tried it in various positions and with double quotes too)
>
> Everything works fine but no label prints.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Mar 17 1999 - 12:34:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US