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.

Bad Calculation in Datawindow

8 posts in DataWindow Last posting was on 2008-08-20 18:26:40.0Z
Chris Kean Posted on 2008-08-19 14:14:46.0Z
From: "Chris Kean" <christopher.kean@stld-cci.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Bad Calculation in Datawindow
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48aad556@forums-1-dub>
Date: 19 Aug 2008 07:14:46 -0700
X-Trace: forums-1-dub 1219155286 10.22.241.152 (19 Aug 2008 07:14:46 -0700)
X-Original-Trace: 19 Aug 2008 07:14:46 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87589
Article PK: 416845

Using PB 10.5.2.7611, I have a datawindow with 3 groups and some summing
being done at each level. The summing appears to work fine until it gets to
the second group level, in which case it ends up dropping the last row from
the third group level.

So, what I'm getting is
TreeView level 1: Value = 18 (Sum of Level 2)
TreeView level 2: Value = 18 (Sum of Level 1)
TreeView level 3: Values: 2,8,4,4,4 (Sum of Detail)
TreeView level Detail: Values: 2(1,1), 8(4,4), 4(4), 4(4), 4(4)

So the caluclations are correct until level 2, where the last row in level 3
is dropped. I checked for ones where the last level 3 row was a sum of
multiple detail rows, and it doesn't count any of the detail rows for the
last row of level 3.

The odder thing is if I modify any of the columns by just adding a space, I
guess a group calc of some kind is done, and the values adjust to their
correct amount, factoring in the last row of level 3. The problem with this
is the report is completely non-interactive, so I can't just dynamically
change a column or something to get the report to recalc once its deployed.

Any ideas on what might be causing this or a way around it? I'll try
updating to the latest EBF and see if it changes anything. I can post the
datawindow if necessary.

Thanks,

Chris


John Posted on 2008-08-19 14:19:37.0Z
Sender: 1d78.48aad5d9.1804289383@sybase.com
From: John
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Bad Calculation in Datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48aad679.1d9b.1681692777@sybase.com>
References: <48aad556@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 19 Aug 2008 07:19:37 -0700
X-Trace: forums-1-dub 1219155577 10.22.241.41 (19 Aug 2008 07:19:37 -0700)
X-Original-Trace: 19 Aug 2008 07:19:37 -0700, 10.22.241.41
Lines: 43
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87590
Article PK: 416846

Hi,

Hadw_1.GroupCalc()?

HTH
John

> Using PB 10.5.2.7611, I have a datawindow with 3 groups
> and some summing being done at each level. The summing
> appears to work fine until it gets to the second group
> level, in which case it ends up dropping the last row from
> the third group level.
>
> So, what I'm getting is
> TreeView level 1: Value = 18 (Sum of Level 2)
> TreeView level 2: Value = 18 (Sum of Level 1)
> TreeView level 3: Values: 2,8,4,4,4 (Sum of Detail)
> TreeView level Detail: Values: 2(1,1), 8(4,4), 4(4), 4(4),
> 4(4)
>
> So the caluclations are correct until level 2, where the
> last row in level 3 is dropped. I checked for ones where
> the last level 3 row was a sum of multiple detail rows,
> and it doesn't count any of the detail rows for the last
> row of level 3.
>
> The odder thing is if I modify any of the columns by just
> adding a space, I guess a group calc of some kind is done
> , and the values adjust to their correct amount,
> factoring in the last row of level 3. The problem with
> this is the report is completely non-interactive, so I
> can't just dynamically change a column or something to
> get the report to recalc once its deployed.
>
> Any ideas on what might be causing this or a way around
> it? I'll try updating to the latest EBF and see if it
> changes anything. I can post the datawindow if necessary.
>
> Thanks,
>
> Chris
>
>


John Posted on 2008-08-19 14:20:03.0Z
Sender: 1d78.48aad5d9.1804289383@sybase.com
From: John
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Bad Calculation in Datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48aad693.1da4.1681692777@sybase.com>
References: <48aad679.1d9b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 19 Aug 2008 07:20:03 -0700
X-Trace: forums-1-dub 1219155603 10.22.241.41 (19 Aug 2008 07:20:03 -0700)
X-Original-Trace: 19 Aug 2008 07:20:03 -0700, 10.22.241.41
Lines: 50
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87591
Article PK: 416849

Hi,

Have you tried dw_1.GroupCalc() ?

HTH
John

> Hi,
>
> Hadw_1.GroupCalc()?
>
> HTH
> John
>
> > Using PB 10.5.2.7611, I have a datawindow with 3 groups
> > and some summing being done at each level. The summing
> > appears to work fine until it gets to the second group
> > level, in which case it ends up dropping the last row
> > from the third group level.
> >
> > So, what I'm getting is
> > TreeView level 1: Value = 18 (Sum of Level 2)
> > TreeView level 2: Value = 18 (Sum of Level 1)
> > TreeView level 3: Values: 2,8,4,4,4 (Sum of Detail)
> > TreeView level Detail: Values: 2(1,1), 8(4,4), 4(4),
> > 4(4), 4(4)
> >
> > So the caluclations are correct until level 2, where the
> > last row in level 3 is dropped. I checked for ones
> > where the last level 3 row was a sum of multiple detail
> > rows, and it doesn't count any of the detail rows for
> > the last row of level 3.
> >
> > The odder thing is if I modify any of the columns by
> > just adding a space, I guess a group calc of some kind
> > is done , and the values adjust to their correct amount
> > , factoring in the last row of level 3. The problem with
> > this is the report is completely non-interactive, so I
> > can't just dynamically change a column or something to
> > get the report to recalc once its deployed.
> >
> > Any ideas on what might be causing this or a way around
> > it? I'll try updating to the latest EBF and see if it
> > changes anything. I can post the datawindow if
> necessary. >
> > Thanks,
> >
> > Chris
> >
> >


Chris Kean Posted on 2008-08-19 17:38:50.0Z
From: "Chris Kean" <christopher.kean@stld-cci.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48aad679.1d9b.1681692777@sybase.com> <48aad693.1da4.1681692777@sybase.com>
Subject: Re: Bad Calculation in Datawindow
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ab052a$1@forums-1-dub>
Date: 19 Aug 2008 10:38:50 -0700
X-Trace: forums-1-dub 1219167530 10.22.241.152 (19 Aug 2008 10:38:50 -0700)
X-Original-Trace: 19 Aug 2008 10:38:50 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87593
Article PK: 416848

I can't do a GroupCalc because the report is part of a different application
that merely loads the datawindow syntax from our database into a holder
object and retrieves it. So, unless there's a way to tell the datawindow to
do a better groupcalc the first time around, that won't work. Thanks for the
suggestion, tho.

Chris

<John> wrote in message news:48aad693.1da4.1681692777@sybase.com...
> Hi,
>
> Have you tried dw_1.GroupCalc() ?
>
> HTH
> John
>
>> Hi,
>>
>> Hadw_1.GroupCalc()?
>>
>> HTH
>> John
>>
>> > Using PB 10.5.2.7611, I have a datawindow with 3 groups
>> > and some summing being done at each level. The summing
>> > appears to work fine until it gets to the second group
>> > level, in which case it ends up dropping the last row
>> > from the third group level.
>> >
>> > So, what I'm getting is
>> > TreeView level 1: Value = 18 (Sum of Level 2)
>> > TreeView level 2: Value = 18 (Sum of Level 1)
>> > TreeView level 3: Values: 2,8,4,4,4 (Sum of Detail)
>> > TreeView level Detail: Values: 2(1,1), 8(4,4), 4(4),
>> > 4(4), 4(4)
>> >
>> > So the caluclations are correct until level 2, where the
>> > last row in level 3 is dropped. I checked for ones
>> > where the last level 3 row was a sum of multiple detail
>> > rows, and it doesn't count any of the detail rows for
>> > the last row of level 3.
>> >
>> > The odder thing is if I modify any of the columns by
>> > just adding a space, I guess a group calc of some kind
>> > is done , and the values adjust to their correct amount
>> > , factoring in the last row of level 3. The problem with
>> > this is the report is completely non-interactive, so I
>> > can't just dynamically change a column or something to
>> > get the report to recalc once its deployed.
>> >
>> > Any ideas on what might be causing this or a way around
>> > it? I'll try updating to the latest EBF and see if it
>> > changes anything. I can post the datawindow if
>> necessary. >
>> > Thanks,
>> >
>> > Chris
>> >
>> >


Paul Horan[TeamSybase] Posted on 2008-08-20 14:32:42.0Z
From: "Paul Horan[TeamSybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48aad679.1d9b.1681692777@sybase.com> <48aad693.1da4.1681692777@sybase.com> <48ab052a$1@forums-1-dub>
Subject: Re: Bad Calculation in Datawindow
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ac2b0a@forums-1-dub>
Date: 20 Aug 2008 07:32:42 -0700
X-Trace: forums-1-dub 1219242762 10.22.241.152 (20 Aug 2008 07:32:42 -0700)
X-Original-Trace: 20 Aug 2008 07:32:42 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87595
Article PK: 416851


"Chris Kean" <christopher.kean@stld-cci.com> wrote in message
news:48ab052a$1@forums-1-dub...
>I can't do a GroupCalc because the report is part of a different
>application that merely loads the datawindow syntax from our database into
>a holder object and retrieves it. So, unless there's a way to tell the
>datawindow to do a better groupcalc the first time around, that won't work.
>Thanks for the suggestion, tho.
>
> Chris
>

Hey Chris,

I don't understand that last statement... If you've got a datawindow
control (no matter how the dataobject gets assigned - at design time or
dynamically), you can call a GroupCalc() on it. In your case, you'd be
adding an extra GroupCalc() after every retrieve. If there aren't any
groups in the actual dwo at the time, no harm - no foul...

Paul Horan[TeamSybase]


fisher <fisher_NO Posted on 2008-08-20 16:39:25.0Z
From: fisher <fisher_NO@SPAM_star.wckp.lodz.pl_PLEASE>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Bad Calculation in Datawindow
References: <48aad679.1d9b.1681692777@sybase.com> <48aad693.1da4.1681692777@sybase.com> <48ab052a$1@forums-1-dub> <48ac2b0a@forums-1-dub>
In-Reply-To: <48ac2b0a@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080820-0, 08/20/2008), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ac48bd@forums-1-dub>
Date: 20 Aug 2008 09:39:25 -0700
X-Trace: forums-1-dub 1219250365 10.22.241.152 (20 Aug 2008 09:39:25 -0700)
X-Original-Trace: 20 Aug 2008 09:39:25 -0700, vip152.sybase.com
Lines: 42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87597
Article PK: 416853

Looks like more generic approach just gathering DB stored DW syntaxes
and creating reports on the fly with a simple retrieve and no additional
processing like groupCalc().

Chris, cant you contact author of this app and request a change ?
Maybe some additional attributes of report or column in table where
syntax is stored to let this app know GroupCalc is required?

Keep in mind that you might require more then one GroupCalc depending of
computed field nesting level.

Regards

Paul Horan[TeamSybase] wrote:
> "Chris Kean" <christopher.kean@stld-cci.com> wrote in message
> news:48ab052a$1@forums-1-dub...
>> I can't do a GroupCalc because the report is part of a different
>> application that merely loads the datawindow syntax from our database into
>> a holder object and retrieves it. So, unless there's a way to tell the
>> datawindow to do a better groupcalc the first time around, that won't work.
>> Thanks for the suggestion, tho.
>>
>> Chris
>>
>
> Hey Chris,
>
> I don't understand that last statement... If you've got a datawindow
> control (no matter how the dataobject gets assigned - at design time or
> dynamically), you can call a GroupCalc() on it. In your case, you'd be
> adding an extra GroupCalc() after every retrieve. If there aren't any
> groups in the actual dwo at the time, no harm - no foul...
>
> Paul Horan[TeamSybase]
>
>


Paul Horan[TeamSybase] Posted on 2008-08-20 16:54:42.0Z
From: "Paul Horan[TeamSybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48aad679.1d9b.1681692777@sybase.com> <48aad693.1da4.1681692777@sybase.com> <48ab052a$1@forums-1-dub> <48ac2b0a@forums-1-dub> <48ac48bd@forums-1-dub>
Subject: Re: Bad Calculation in Datawindow
Lines: 57
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ac4c52$1@forums-1-dub>
Date: 20 Aug 2008 09:54:42 -0700
X-Trace: forums-1-dub 1219251282 10.22.241.152 (20 Aug 2008 09:54:42 -0700)
X-Original-Trace: 20 Aug 2008 09:54:42 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87598
Article PK: 416854

That's what I'm saying...

Somewhere, there's some code that probably reads like this:
SELECT dwSyntax into :ls_some_string from someTable;
dw_1.datawindow.syntax = ls_some_string
dw_1.setTransObject(SQLCA)
dw_1.retrieve()

I'm saying add a dw_1.groupCalc() after the retrieve(). Can't hurt
anything...

-Paul-

"fisher" <fisher_NO@SPAM_star.wckp.lodz.pl_PLEASE> wrote in message
news:48ac48bd@forums-1-dub...
>
> Looks like more generic approach just gathering DB stored DW syntaxes and
> creating reports on the fly with a simple retrieve and no additional
> processing like groupCalc().
>
> Chris, cant you contact author of this app and request a change ?
> Maybe some additional attributes of report or column in table where syntax
> is stored to let this app know GroupCalc is required?
>
> Keep in mind that you might require more then one GroupCalc depending of
> computed field nesting level.
>
> Regards
>
>
>
>
>
>
> Paul Horan[TeamSybase] wrote:
>> "Chris Kean" <christopher.kean@stld-cci.com> wrote in message
>> news:48ab052a$1@forums-1-dub...
>>> I can't do a GroupCalc because the report is part of a different
>>> application that merely loads the datawindow syntax from our database
>>> into a holder object and retrieves it. So, unless there's a way to tell
>>> the datawindow to do a better groupcalc the first time around, that
>>> won't work. Thanks for the suggestion, tho.
>>>
>>> Chris
>>>
>>
>> Hey Chris,
>>
>> I don't understand that last statement... If you've got a datawindow
>> control (no matter how the dataobject gets assigned - at design time or
>> dynamically), you can call a GroupCalc() on it. In your case, you'd be
>> adding an extra GroupCalc() after every retrieve. If there aren't any
>> groups in the actual dwo at the time, no harm - no foul...
>>
>> Paul Horan[TeamSybase]
>>


fisher <fisher_NO Posted on 2008-08-20 18:26:40.0Z
From: fisher <fisher_NO@SPAM_star.wckp.lodz.pl_PLEASE>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Bad Calculation in Datawindow
References: <48aad679.1d9b.1681692777@sybase.com> <48aad693.1da4.1681692777@sybase.com> <48ab052a$1@forums-1-dub> <48ac2b0a@forums-1-dub> <48ac48bd@forums-1-dub> <48ac4c52$1@forums-1-dub>
In-Reply-To: <48ac4c52$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 080820-0, 08/20/2008), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ac61e0@forums-1-dub>
Date: 20 Aug 2008 11:26:40 -0700
X-Trace: forums-1-dub 1219256800 10.22.241.152 (20 Aug 2008 11:26:40 -0700)
X-Original-Trace: 20 Aug 2008 11:26:40 -0700, vip152.sybase.com
Lines: 62
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87599
Article PK: 416857

Paul,
what I understood is that application that displays a report is not a
subject of modifications ...so they can't add Groupcalc call.

Paul Horan[TeamSybase] wrote:
> That's what I'm saying...
>
> Somewhere, there's some code that probably reads like this:
> SELECT dwSyntax into :ls_some_string from someTable;
> dw_1.datawindow.syntax = ls_some_string
> dw_1.setTransObject(SQLCA)
> dw_1.retrieve()
>
> I'm saying add a dw_1.groupCalc() after the retrieve(). Can't hurt
> anything...
>
> -Paul-
>
> "fisher" <fisher_NO@SPAM_star.wckp.lodz.pl_PLEASE> wrote in message
> news:48ac48bd@forums-1-dub...
>> Looks like more generic approach just gathering DB stored DW syntaxes and
>> creating reports on the fly with a simple retrieve and no additional
>> processing like groupCalc().
>>
>> Chris, cant you contact author of this app and request a change ?
>> Maybe some additional attributes of report or column in table where syntax
>> is stored to let this app know GroupCalc is required?
>>
>> Keep in mind that you might require more then one GroupCalc depending of
>> computed field nesting level.
>>
>> Regards
>>
>>
>>
>>
>>
>>
>> Paul Horan[TeamSybase] wrote:
>>> "Chris Kean" <christopher.kean@stld-cci.com> wrote in message
>>> news:48ab052a$1@forums-1-dub...
>>>> I can't do a GroupCalc because the report is part of a different
>>>> application that merely loads the datawindow syntax from our database
>>>> into a holder object and retrieves it. So, unless there's a way to tell
>>>> the datawindow to do a better groupcalc the first time around, that
>>>> won't work. Thanks for the suggestion, tho.
>>>>
>>>> Chris
>>>>
>>> Hey Chris,
>>>
>>> I don't understand that last statement... If you've got a datawindow
>>> control (no matter how the dataobject gets assigned - at design time or
>>> dynamically), you can call a GroupCalc() on it. In your case, you'd be
>>> adding an extra GroupCalc() after every retrieve. If there aren't any
>>> groups in the actual dwo at the time, no harm - no foul...
>>>
>>> Paul Horan[TeamSybase]
>>>
>