Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

computed field won't add

3 posts in PB Infomaker Report Writer Last posting was on 1999-06-24 19:12:45.0Z
btate Posted on 1999-06-24 03:41:58.0Z
Newsgroups: sybase.public.infomaker.general
From: "btate" <btate@tez.net>
Subject: computed field won't add
Date: Wed, 23 Jun 1999 23:41:58 -0400
Lines: 15
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <348_doiPSIfv#GA.75@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6159
Article PK: 240094

hey all,

am new to infomaker.have a computed field in a trailer group with the
following code and am trying to sum in the summary footer, keeps coming up
zero. have used this if statement in other reports and it works.
any ideas would be appreciated.


if(card_trans_card_trans_type_cd = '11' or card_trans_card_trans_type_cd =
'61' or card_trans_card_trans_type_cd = '63' or
card_trans_card_trans_type_cd = '65', group_sum * -1 , group_sum)

btate@tez.net


Rick Marden Posted on 1999-06-24 12:23:48.0Z
Newsgroups: sybase.public.infomaker.general
Reply-To: "Rick Marden" <rmarden@primavera.com>
From: "Rick Marden" <rmarden@primavera.com>
Subject: Re: computed field won't add
Date: Thu, 24 Jun 1999 08:23:48 -0400
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <348_AdG0Fwjv#GA.287@forums.sybase.com>
References: <348_doiPSIfv#GA.75@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6156
Article PK: 240092

It looks like you are trying to use an aggregate function (sum) in an
expression at a different level of the report as in the summary. I do not
believe this is possible. This is from the IM help:

Restrictions for aggregate functions

"An aggregate function is a function (such as Avg, Max, StDev, and Sum) that
operates on a range of values in a column. When you use an aggregate
function, some restrictions apply. You cannot use an aggregate function:

¨ In a filter
¨ In a validation rule
¨ As an argument for another aggregate function

When you use aggregate functions, they cancel the effect of setting Retrieve
Rows As Needed. To do the aggregation, the report always retrieves all
rows."

Rick Marden
Primavera Systems, Inc.

btate <btate@tez.net> wrote in message
news:doiPSIfv#GA.75@forums.sybase.com...
> hey all,
>
> am new to infomaker.have a computed field in a trailer group with the
> following code and am trying to sum in the summary footer, keeps coming up
> zero. have used this if statement in other reports and it works.
> any ideas would be appreciated.
>
>
> if(card_trans_card_trans_type_cd = '11' or card_trans_card_trans_type_cd
=
> '61' or card_trans_card_trans_type_cd = '63' or
> card_trans_card_trans_type_cd = '65', group_sum * -1 , group_sum)
>
> btate@tez.net
>
>


Terry Dykstra Posted on 1999-06-24 19:12:45.0Z
Newsgroups: sybase.public.infomaker.general
From: "Terry Dykstra" <tdykstra@cfol.ab.ca>
Subject: Re: computed field won't add
Date: Thu, 24 Jun 1999 13:12:45 -0600
Lines: 56
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
Message-ID: <348_SSCGITnv#GA.287@forums.sybase.com>
References: <348_doiPSIfv#GA.75@forums.sybase.com> <348_AdG0Fwjv#GA.287@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6154
Article PK: 240090

If indeed as Rick assumes you are doing sums of sums, try creating two
computed fields in the detail band: one that is set to the value when
card_trans_card_trans_type_cd has the one condition, else 0
and the other computed field the opposite. Then use these 2 computed fields
in your conditional sum.

--
Terry Dykstra (TeamSybase)
Canadian Forest Oil Ltd.

Rick Marden wrote in message ...
>It looks like you are trying to use an aggregate function (sum) in an
>expression at a different level of the report as in the summary. I do not
>believe this is possible. This is from the IM help:
>
>Restrictions for aggregate functions
>
>"An aggregate function is a function (such as Avg, Max, StDev, and Sum)
that
>operates on a range of values in a column. When you use an aggregate
>function, some restrictions apply. You cannot use an aggregate function:
>
>¨ In a filter
>¨ In a validation rule
>¨ As an argument for another aggregate function
>
>When you use aggregate functions, they cancel the effect of setting
Retrieve
>Rows As Needed. To do the aggregation, the report always retrieves all
>rows."
>
>Rick Marden
>Primavera Systems, Inc.
>
>btate <btate@tez.net> wrote in message
>news:doiPSIfv#GA.75@forums.sybase.com...
>> hey all,
>>
>> am new to infomaker.have a computed field in a trailer group with the
>> following code and am trying to sum in the summary footer, keeps coming
up
>> zero. have used this if statement in other reports and it works.
>> any ideas would be appreciated.
>>
>>
>> if(card_trans_card_trans_type_cd = '11' or card_trans_card_trans_type_cd
>=
>> '61' or card_trans_card_trans_type_cd = '63' or
>> card_trans_card_trans_type_cd = '65', group_sum * -1 , group_sum)
>>
>> btate@tez.net
>>
>>
>
>