Object Definition Questions

X-cc: “Greengrass, Lee S. (LGRN)” LGRN@chevron.com

I’m using Business Objects 3.1 for Unix/Sybase to allow clients to create files for export to Excel. I have a lot of calculations to perform and after defining a few in Business Objects, I’m wondering if it wouldn’t be much easier to do them first in Sybase/SQR and just point Bus Objects to the results?

A couple of examples:

Some incorporate “If-Then-Else” logic that only seems to be available in the report definition part of BO-- I was hoping to avoid this and go straight from the ascii to Excel. (Is it possible to incorporate if-then-else when defining an object?)

Others involve calculations based on previous calculations. There does not seem to be any way to refer to the previous calculations when defining a new object, other than to restate the original calculation in its entirety (pointing directly to database elements). Is that true? Some of my calcs are getting very long!

Any suggestions will be much appreciated.

Thanks for your consideration,

Steve Aultman
CITC


Listserv Archives (BOB member since 2002-06-25)

In a message dated 98-08-28 13:56:11 EDT, you write:

Some incorporate “If-Then-Else” logic that only seems to be available in the
report definition part of BO-- I was hoping to avoid this and go straight from the ascii to Excel. (Is it possible to incorporate if-then-else when defining an object?)

Yes, you can simulate “if-then-else” logic in Sybase. If you can provide a more specific requirement then perhaps someone can help you. There are different tricks for doing logic based on numeric values from character values from date values and so on. Or you can switch to Oracle and use the allmighty “Decode” function.

Others involve calculations based on previous calculations. There does not seem to be any way to refer to the previous calculations when defining a
new
object, other than to restate the original calculation in its entirety (pointing directly to database elements). Is that true? Some of my calcs are getting very long!

In version 3, there was no way to base one object on another. Version 4.x added that functionality. So you do have to repeat each formula in its entirety. Warning: BusObj 3.x only allowed objects to contain up to 400 characters of SQL code; so if your formulas get too long then you won’t be able to complete the entire thing.

You can use an external file to add more SQL code to your objects, and then reference that file using a -vars command line. However, that means that your SQL code exists outside of the universe, and is therefore subject to alteration, deletion, etc. For more information on how this works, feel free to drop me a direct email.

Or you can plan on upgrading to 4.x and have objects be as long as you want / need them to be. :slight_smile:

Regards,
Dave Rathbun
Integra Solutions
www.islink.com


Listserv Archives (BOB member since 2002-06-25)

Some incorporate “If-Then-Else” logic that only seems to be available
in the
report definition part of BO-- I was hoping to avoid this and go
straight
from the ascii to Excel. (Is it possible to incorporate if-then-else
when
defining an object?)

Yes, you can simulate “if-then-else” logic in Sybase. If you can provide a more specific requirement then perhaps someone can help you.

===
thanks, what I’m looking for conceptually is along the lines of “if object_a is not null, use object_b - object_a, else use object_c”.


Listserv Archives (BOB member since 2002-06-25)

thanks, what I’m looking for conceptually is along the lines of “if object_a is not null, use object_b - object_a, else use object_c”.

What are the data types for the columns in question?

[Aultman, Steven (smau)] They are all numeric in business objects, based on underlying “floats” in a Sybase 4.9 db. Also, that’s supposed to be object_b (minus) object_a, in case it isn’t clear. Thanks!


Listserv Archives (BOB member since 2002-06-25)

In a message dated 98-09-09 12:05:55 EDT, you write:

[Aultman, Steven (smau)] They are all numeric in business objects, based on underlying “floats” in a Sybase 4.9 db. Also, that’s supposed to be object_b (minus) object_a, in case it isn’t clear. Thanks!

Hi, Steve…

Check to see if you have the isnull() function… I believe with your version of the database you should. If so, here’s your solution:

isnull(object_b - object_a, object_c)

If the result of object_b - object_a is null, then the value of object_c will be used instead. If object_b and object_a are both not null, then the result of the subtraction should be used. If any one value of an equation (b-a) is null, then the entire calculation results in a null result.

I don’t have a Sybase database available right now to confirm this, but I think it should work!

Regards,
Dave Rathbun
Integra Solutions


Listserv Archives (BOB member since 2002-06-25)