Home » Developer & Programmer » Reports & Discoverer » multiplying values of fields (Reports developer 9i, WinXP)
multiplying values of fields [message #279921] Sun, 11 November 2007 20:56 Go to next message
c3179186
Messages: 2
Registered: November 2007
Location: United Kingdom
Junior Member
I'm really new to the report builder, so forgive me for my lack of knowledge on report dev jargon Confused

What I need to know is how do I take a value from one field, multiply with a value from another field and put the result in (yet) another field?

This is for my uni project, and it's the only thing I'm stuck on Embarassed
/forum/fa/3377/0/

Thanks in advance!

PS: I'm sorry if there is already a question like this, I just wasn't sure what to put in the search Laughing
  • Attachment: how.jpg
    (Size: 154.28KB, Downloaded 1135 times)

[Updated on: Sun, 11 November 2007 20:57]

Report message to a moderator

Re: multiplying values of fields [message #279936 is a reply to message #279921] Mon, 12 November 2007 00:21 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Two ways I can think of at the moment.

The first one is obvious - multiply those values directly in a query:
SELECT unit_price, quantity, unit_price * quantity service_price
FROM some_table
WHERE ...

Another one is to use a formula column. It is a function that returns a value (number in your case); its body would look like
RETURN (:unit_price * :quantity);
Note colon signs which mean "reference this value from the column I've already selected".
Re: multiplying values of fields [message #280041 is a reply to message #279921] Mon, 12 November 2007 06:21 Go to previous message
c3179186
Messages: 2
Registered: November 2007
Location: United Kingdom
Junior Member
You are a life saver! Surprised

Thank you T__T
Previous Topic: What is the Latest Patch Available for Reports 6i
Next Topic: problem in Report builder
Goto Forum:
  


Current Time: Wed Jul 03 01:11:00 CDT 2024