Negative

Dicas e truques sobre Oracle Reports Builder - modo gráfico ou modo caractere, ascii, arquivo .PRT, etc
Post Reply
gr_sp
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 24
Joined: Wed, 26 May 2010 10:17 am
Location: São Paulo

Hello everyone,

In my report (Report 6i), it has a Number field, referring to the sum of a column. (SUM)

I would like this field to be negative (-).

What should I do?

Thanks.
Diego_Mello
Rank: DBA Júnior
Rank: DBA Júnior
Posts: 229
Joined: Fri, 05 Sep 2008 2:59 pm
Location: Igrejinha - RS
Diego Mello
Igrejinha - RS
www.twitter.com/diegolmello

Multiplies by -1.
gr_sp
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 24
Joined: Wed, 26 May 2010 10:17 am
Location: São Paulo

This is the function of the field:

Select all

 function "nome_procedure" return boolean is 
begin 
   
  return (TRUE); 
end;  
Where should I insert the -1?

Thanks.
Diego_Mello
Rank: DBA Júnior
Rank: DBA Júnior
Posts: 229
Joined: Fri, 05 Sep 2008 2:59 pm
Location: Igrejinha - RS
Diego Mello
Igrejinha - RS
www.twitter.com/diegolmello

So ..
if you can, multiplication on your query.
Since, it creates a formula that does.
rodfbar
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 241
Joined: Tue, 09 Oct 2007 11:15 am
Location: Batatais - SP

Good afternoon. 99]]

Select all

 
if :campo_soma >= 0 then 
  return false;  
else  
  return true; 
end if;
Abrçs
gr_sp
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 24
Joined: Wed, 26 May 2010 10:17 am
Location: São Paulo

Give me an example, please.

I do not know where to put on Query.
Diego_Mello
Rank: DBA Júnior
Rank: DBA Júnior
Posts: 229
Joined: Fri, 05 Sep 2008 2:59 pm
Location: Igrejinha - RS
Diego Mello
Igrejinha - RS
www.twitter.com/diegolmello

Select all

 
SELECT sua_soma * -1 
   FROM tabela; 
gr_sp
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 24
Joined: Wed, 26 May 2010 10:17 am
Location: São Paulo

But there is one thing, this sum field is not in the report query.

is a Summary Column ... which is created when doing a report.

Do you understand?

Thanks for the help.
Diego_Mello
Rank: DBA Júnior
Rank: DBA Júnior
Posts: 229
Joined: Fri, 05 Sep 2008 2:59 pm
Location: Igrejinha - RS
Diego Mello
Igrejinha - RS
www.twitter.com/diegolmello

Beauty ..
Then creates a column formula that will return it multiplied by -1.
gr_sp
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 24
Joined: Wed, 26 May 2010 10:17 am
Location: São Paulo

I can not create, is not it just to go in Formula Columns and click Create?
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests