Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a formula? 1

Status
Not open for further replies.

Jetter88

Programmer
Nov 14, 2003
35
CA
I'm trying to create a formula field for my report. The formula field is to combine 2 fields together. In my case... the area code and phone number.

am I going in the right direction?

I'm new to Oracle reports so any help is appeciated.

thanks in advanced!
 
Yes, a formula field can do what you want. In the data model create your formula field in the same group as the Area Code and Phone Number. Set the datatype and width on the Property Inspector. Create the PL/SQL formula with code similar to:
Code:
return('('||:AREA_CODE||') '||:PHONE_NBR);

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: Emu Products Plus
 
Thanks BJCooperIT!

This worked perfectly! Excellent explanation on how to do it too!

i'll probably have more in the future! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top