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.

Datawindow column summing

6 posts in DataWindow Last posting was on 2008-11-27 02:11:32.0Z
Mark Pare Posted on 2008-11-26 14:55:29.0Z
Sender: 6642.492d6253.1804289383@sybase.com
From: Mark Pare
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Datawindow column summing
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <492d6361.66ca.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-=_forums-1-dub492d6361"
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Nov 2008 06:55:29 -0800
X-Trace: forums-1-dub 1227711329 10.22.241.41 (26 Nov 2008 06:55:29 -0800)
X-Original-Trace: 26 Nov 2008 06:55:29 -0800, 10.22.241.41
Lines: 4751
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88241
Article PK: 417496

Hi, I have a datawindow that displays what's in scrshot1.jpg
The datawindow definition is in scrshot2.jpg. I am simply
using a computed column and summing the column for all and
coming up with NHL Totals. The problem is that it's
including the OHL totals as well. Does anyone know how I can
re-work the datawindow so I would have the following in the
Summary band:

NHL Totals x, y, z
OHL Totals x, y, z

Let me know. Thanks

scrshot1.jpg
scrshot2.jpg

Chris Werner Posted on 2008-11-26 15:12:16.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <492d6361.66ca.1681692777@sybase.com>
Subject: Re: Datawindow column summing
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <492d6750$1@forums-1-dub>
Date: 26 Nov 2008 07:12:16 -0800
X-Trace: forums-1-dub 1227712336 10.22.241.152 (26 Nov 2008 07:12:16 -0800)
X-Original-Trace: 26 Nov 2008 07:12:16 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88242
Article PK: 417493

Hi Mark,

something like this:

sum( if(league='NHL', gp, 0) for all )

and

sum( if(league='OHL', gp, 0) for all )

HTH

Chris Werner
f+s software gmbh


<Mark Pare> schrieb im Newsbeitrag
news:492d6361.66ca.1681692777@sybase.com...

> Hi, I have a datawindow that displays what's in scrshot1.jpg
> The datawindow definition is in scrshot2.jpg. I am simply
> using a computed column and summing the column for all and
> coming up with NHL Totals. The problem is that it's
> including the OHL totals as well. Does anyone know how I can
> re-work the datawindow so I would have the following in the
> Summary band:
>
> NHL Totals x, y, z
> OHL Totals x, y, z
>
> Let me know. Thanks
>


Mark Pare Posted on 2008-11-26 15:27:22.0Z
Sender: 6642.492d6253.1804289383@sybase.com
From: Mark Pare
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Datawindow column summing
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <492d6ada.698f.1681692777@sybase.com>
References: <492d6750$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Nov 2008 07:27:22 -0800
X-Trace: forums-1-dub 1227713242 10.22.241.41 (26 Nov 2008 07:27:22 -0800)
X-Original-Trace: 26 Nov 2008 07:27:22 -0800, 10.22.241.41
Lines: 41
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88244
Article PK: 417497

Hi Chris, this looks like it might work, but I can't always
know what leagues a player may have statistics for so
another player may have NHL and AHL and WHL, he may have 5
leagues or a single league. Would you know how to do that?

Perhaps manual manipulation of the datawindow is required
here using your expressions below?

> Hi Mark,
>
> something like this:
>
> sum( if(league='NHL', gp, 0) for all )
>
> and
>
> sum( if(league='OHL', gp, 0) for all )
>
> HTH
>
> Chris Werner
> f+s software gmbh
>
>
> <Mark Pare> schrieb im Newsbeitrag
> news:492d6361.66ca.1681692777@sybase.com...
> > Hi, I have a datawindow that displays what's in
> > scrshot1.jpg The datawindow definition is in
> > scrshot2.jpg. I am simply using a computed column and
> > summing the column for all and coming up with NHL
> > Totals. The problem is that it's including the OHL
> > totals as well. Does anyone know how I can re-work the
> > datawindow so I would have the following in the Summary
> band: >
> > NHL Totals x, y, z
> > OHL Totals x, y, z
> >
> > Let me know. Thanks
> >
>
>


Scott Morris Posted on 2008-11-26 16:27:29.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <492d6750$1@forums-1-dub> <492d6ada.698f.1681692777@sybase.com>
Subject: Re: Datawindow column summing
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <492d78f1@forums-1-dub>
Date: 26 Nov 2008 08:27:29 -0800
X-Trace: forums-1-dub 1227716849 10.22.241.152 (26 Nov 2008 08:27:29 -0800)
X-Original-Trace: 26 Nov 2008 08:27:29 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88246
Article PK: 417498


<Mark Pare> wrote in message news:492d6ada.698f.1681692777@sybase.com...
> Hi Chris, this looks like it might work, but I can't always
> know what leagues a player may have statistics for so
> another player may have NHL and AHL and WHL, he may have 5
> leagues or a single league. Would you know how to do that?
>
> Perhaps manual manipulation of the datawindow is required
> here using your expressions below?

You could do this via PB code that executed after the datawindow is
retrieved - but that divides the logic of the "report" into multiple places.
Another option is to embed another datawindow in the summary band that
generates your totals for you. This will allow you to add or change leagues
without having to change any code - at the expense of a double hit (for
queries) against the data (as well as forcing the datawindow to be
non-editable and always in print-preview mode).


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-11-26 15:38:14.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Datawindow column summing
References: <492d6750$1@forums-1-dub> <492d6ada.698f.1681692777@sybase.com>
In-Reply-To: <492d6ada.698f.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <492d6d66@forums-1-dub>
Date: 26 Nov 2008 07:38:14 -0800
X-Trace: forums-1-dub 1227713894 10.22.241.152 (26 Nov 2008 07:38:14 -0800)
X-Original-Trace: 26 Nov 2008 07:38:14 -0800, vip152.sybase.com
Lines: 46
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88245
Article PK: 417500

You probably want to group by league, put the totals in the group
trailer band, and make your expression: sum ( gp for group 1 )

Mark Pare wrote:
> Hi Chris, this looks like it might work, but I can't always
> know what leagues a player may have statistics for so
> another player may have NHL and AHL and WHL, he may have 5
> leagues or a single league. Would you know how to do that?
>
> Perhaps manual manipulation of the datawindow is required
> here using your expressions below?
>
>> Hi Mark,
>>
>> something like this:
>>
>> sum( if(league='NHL', gp, 0) for all )
>>
>> and
>>
>> sum( if(league='OHL', gp, 0) for all )
>>
>> HTH
>>
>> Chris Werner
>> f+s software gmbh
>>
>>
>> <Mark Pare> schrieb im Newsbeitrag
>> news:492d6361.66ca.1681692777@sybase.com...
>>> Hi, I have a datawindow that displays what's in
>>> scrshot1.jpg The datawindow definition is in
>>> scrshot2.jpg. I am simply using a computed column and
>>> summing the column for all and coming up with NHL
>>> Totals. The problem is that it's including the OHL
>>> totals as well. Does anyone know how I can re-work the
>>> datawindow so I would have the following in the Summary
>> band: >
>>> NHL Totals x, y, z
>>> OHL Totals x, y, z
>>>
>>> Let me know. Thanks
>>>
>>


Harry Posted on 2008-11-27 02:11:32.0Z
From: "Harry" <nospam.harrylhy@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <492d6361.66ca.1681692777@sybase.com>
Subject: Re: Datawindow column summing
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <492e01d4@forums-1-dub>
Date: 26 Nov 2008 18:11:32 -0800
X-Trace: forums-1-dub 1227751892 10.22.241.152 (26 Nov 2008 18:11:32 -0800)
X-Original-Trace: 26 Nov 2008 18:11:32 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88247
Article PK: 417502

if your dbms supports "derive table", you can do it easily :)


<Mark Pare> ??? news:492d6361.66ca.1681692777@sybase.com ???...

> Hi, I have a datawindow that displays what's in scrshot1.jpg
> The datawindow definition is in scrshot2.jpg. I am simply
> using a computed column and summing the column for all and
> coming up with NHL Totals. The problem is that it's
> including the OHL totals as well. Does anyone know how I can
> re-work the datawindow so I would have the following in the
> Summary band:
>
> NHL Totals x, y, z
> OHL Totals x, y, z
>
> Let me know. Thanks
>