Focal Point
[CLOSED] how to create formula columns

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/907107932

September 15, 2009, 01:14 AM
DD
[CLOSED] how to create formula columns
Hi,
We recently bought IBI tool(WebFocus 7.6.9)
We are having hard time while converting the existing oracle reports into IBI. In Oracle there are formula columns(which are Sqls) which gets fired for each row by passing other Columns values of current row into the formula column Sql. We could not find a way to do this in Webfocus developer studio 7.6.9 The Define box has got just some arithmetic calulations fecility, but not the ability of running a Sql and returning a value.
So in Short, we are looking for a way to fire a Sql and store the return value in a local variable and use the variable to pass to another Sql or Display in the header etc...
We are using Developer studio, not the command console (as we don't know Focus language)
Please help us...

Thanks,
Rom

This message has been edited. Last edited by: Kerry,


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
September 15, 2009, 01:24 AM
Waz
You have a couple of options here.

1. Embed the original SQL in the FOCUS code
2. Convert the sub queries and use Joins etc.

Use the search option above and look for sub queries, this may help.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

September 15, 2009, 11:36 AM
Darin Lee
There are also functions available, not just arithmetic operations. Prefix operators, COMPUTEd fields, multi-verb sets, etc.

WebFOCUS is pretty easy to use, but it's a little more complicated than using a bicycle. More like flying an airplane. A beginner just doesn't jump in an airplane and fiddle around with things hoping to take off. You've got to know the equipment and tools at your disposal. After you've got that down, you can practically make the plane fly itself and the sky's the limit.

If you're expecting to get by with what is obvious through the GUI tool, you're severely limiting yourself.

Take a look at some of the sample code and the report that are produced and familiarize yourself a little with the FOCUS language and you'll get a lot further. There's a place for SQL code, but WF tools are meant to provide above and beyond what SQL allows. A lot of your subqueries can actually be done in FOCUS code with a single pass, and JOINS, COMPUTEs, prefix operators and such will also get you most of what you need. Just get yourself out of the SQL box.

Please take this as a helpful suggestion and not as a criticism. We all had to get where we are from where you are.

A little training goes a loooooong way.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat