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.

after datawindow import, global functions stop working

3 posts in DataWindow Last posting was on 2008-07-16 19:35:30.0Z
Brad Mettee Posted on 2008-07-02 18:56:09.0Z
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: after datawindow import, global functions stop working
From: Brad Mettee <bmettee@REMOVE.pchotshots.com>
Organization: PC HotShots, Inc.
X-Newsreader: WinVN 0.99.12N (x86 32bit)
MIME-Version: 1.0
Content-Type: Text/Plain; charset=US-ASCII
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <486bcf49$1@forums-1-dub>
Date: 2 Jul 2008 11:56:09 -0700
X-Trace: forums-1-dub 1215024969 10.22.241.152 (2 Jul 2008 11:56:09 -0700)
X-Original-Trace: 2 Jul 2008 11:56:09 -0700, vip152.sybase.com
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87304
Article PK: 416561

I'm having a problem with imported datawindows at runtime and I can reproduce
it every time.

PB 10.2.1 build 9891

History:
I have previously asked questions about the pbl internal search path for
datawindows and being able to clear it. Having not found any way to do it, I
created a dedicated (but very short) separate exe to do the unload/load of
datawindows for use in nested reports (changing group/sort order isn't possible
on level 2+ of nests).

Problem
User selects report and sorting/grouping options
Main app calls separate exe which does this:
Export datawindow using library function from a pbl to string var
Manipulate string to change order/groups
Import string var into datawindow in runtime reports pbl (which is at the
beginning of the pbl search path in main application)

Main exe then loads report datawindow and user previews/prints it.

The problem is that some of the modified datawindows have calls to global
functions for item painting and string manipulation that isn't possible during the
retrieve. These functions just act like they don't exist.

Everything works fine if I open the datawindow out of the runtime pbl and save it,
then bypass the external app. Calling regen alone doesn't seem to be enough, it
appears that PB actually has to save the datawindow to the pbl before those
functions will work.

I did try searching for this problem but couldn't find a good combo of search
terms that gave relevant hits.

Has anyone encountered anything similar? Can someone test to see if this is a
problem in PB 11.2?


Jeremy Lakeman Posted on 2008-07-07 00:21:27.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: after datawindow import, global functions stop working
Date: Sun, 6 Jul 2008 17:21:27 -0700 (PDT)
Organization: http://groups.google.com
Lines: 67
Message-ID: <46e5c586-3a3f-4379-904d-d149c17800b9@m36g2000hse.googlegroups.com>
References: <486bcf49$1@forums-1-dub>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1215390088 24099 127.0.0.1 (7 Jul 2008 00:21:28 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 7 Jul 2008 00:21:28 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m36g2000hse.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!m36g2000hse.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87317
Article PK: 416574


On Jul 3, 3:56 am, Brad Mettee <bmet...@REMOVE.pchotshots.com> wrote:
> I'm having a problem with imported datawindows at runtime and I can reproduce
> it every time.
>
> PB 10.2.1 build 9891
>
> History:
> I have previously asked questions about the pbl internal search path for
> datawindows and being able to clear it. Having not found any way to do it, I
> created a dedicated (but very short) separate exe to do the unload/load of
> datawindows for use in nested reports (changing group/sort order isn't possible
> on level 2+ of nests).
>
> Problem
> User selects report and sorting/grouping options
> Main app calls separate exe which does this:
>         Export datawindow using library function from a pbl to string var
>         Manipulate string to change order/groups
>         Import string var into datawindow in runtime reports pbl (which is at the
> beginning of the pbl search path in main application)
>
> Main exe then loads report datawindow and user previews/prints it.
>
> The problem is that some of the modified datawindows have calls to global
> functions for item painting and string manipulation that isn't possible during the
> retrieve. These functions just act like they don't exist.
>
> Everything works fine if I open the datawindow out of the runtime pbl and save it,
> then bypass the external app. Calling regen alone doesn't seem to be enough, it
> appears that PB actually has to save the datawindow to the pbl before those
> functions will work.
>
> I did try searching for this problem but couldn't find a good combo of search
> terms that gave relevant hits.
>
> Has anyone encountered anything similar? Can someone test to see if this is a
> problem in PB 11.2?

Well, that's odd. I've never had to go to such lengths to import and
use a nested report object.

I would suggest creating a new library in the temp directory, adding
it to your library list, and importing all nested objects into it.
However you should be careful to ensure that the name of the object is
always unique and doesn't clash with the name of any other datawindow
object in your application.

If you generate a unique name based on the modifications you do to the
syntax, you can cache each generated object so you don't have to build
them again.

Finally, if you call LibraryImport and it fails with no error text,
open a window and try again. This will cause your instance of PB to
close all its file handles so you can get a write handle to the pbl
again.


Brad Mettee Posted on 2008-07-16 19:35:30.0Z
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: after datawindow import, global functions stop working
From: Brad Mettee <bmettee@REMOVE.pchotshots.com>
Organization: PC HotShots, Inc.
X-Newsreader: WinVN 0.99.12N (x86 32bit)
References: <486bcf49$1@forums-1-dub> <46e5c586-3a3f-4379-904d-d149c17800b9@m36g2000hse.googlegroups.com>
MIME-Version: 1.0
Content-Type: Text/Plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8Bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <487e4d82$1@forums-1-dub>
Date: 16 Jul 2008 12:35:30 -0700
X-Trace: forums-1-dub 1216236930 10.22.241.152 (16 Jul 2008 12:35:30 -0700)
X-Original-Trace: 16 Jul 2008 12:35:30 -0700, vip152.sybase.com
Lines: 93
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87397
Article PK: 416653

Comments interspersed.

In article
<46e5c586-3a3f-4379-904d-d149c17800b9@m36g2000hse.googlegroups.com>,
jeremy.lakeman@gmail.com says...

>
>
>On Jul 3, 3:56 am, Brad Mettee <bmet...@REMOVE.pchotshots.com> wrote:
>> I'm having a problem with imported datawindows at runtime and I can
reproduce
>> it every time.
>>
>> PB 10.2.1 build 9891
>>
>> History:
>> I have previously asked questions about the pbl internal search path for
>> datawindows and being able to clear it. Having not found any way to do it, I
>> created a dedicated (but very short) separate exe to do the unload/load of
>> datawindows for use in nested reports (changing group/sort order isn't
>> possible
>> on level 2+ of nests).
>>
>> Problem
>> User selects report and sorting/grouping options
>> Main app calls separate exe which does this:
>>         Export datawindow using library function from a pbl to string var
>>         Manipulate string to change order/groups
>>         Import string var into datawindow in runtime reports pbl (which is at
>> the
>> beginning of the pbl search path in main application)
>>
>> Main exe then loads report datawindow and user previews/prints it.
>>
>> The problem is that some of the modified datawindows have calls to global
>> functions for item painting and string manipulation that isn't possible during
>> the
>> retrieve. These functions just act like they don't exist.
>>
>> Everything works fine if I open the datawindow out of the runtime pbl and save
>> it,
>> then bypass the external app. Calling regen alone doesn't seem to be
enough,
>> it
>> appears that PB actually has to save the datawindow to the pbl before those
>> functions will work.
>>
>> I did try searching for this problem but couldn't find a good combo of search
>> terms that gave relevant hits.
>>
>> Has anyone encountered anything similar? Can someone test to see if this is
a
>> problem in PB 11.2?
>
>Well, that's odd. I've never had to go to such lengths to import and
>use a nested report object.

Agreed. If I was just importing it from a deployed txt file, that would be fine, but
the original datawindows are in the main application pbd's already and only get
modified when necessary.

>I would suggest creating a new library in the temp directory, adding
>it to your library list, and importing all nested objects into it.
>However you should be careful to ensure that the name of the object is
>always unique and doesn't clash with the name of any other datawindow
>object in your application.

Datawindow/pbl naming conventions wouldn't cause any overlap, but how can I
export/import datawindows without PB holding on to the location of the original
objects? This was the original cause of the above solution.

>If you generate a unique name based on the modifications you do to the
>syntax, you can cache each generated object so you don't have to build
>them again.

Interesting concept, but then how do I then get the report (possibly several levels
deep) to see the new name? Or are you suggesting copying out of the saved dw
to a temp copy with the "right" name?

>Finally, if you call LibraryImport and it fails with no error text,
>open a window and try again. This will cause your instance of PB to
>close all its file handles so you can get a write handle to the pbl
>again.

Haven't had this one occur yet, probably because the second app is the one
opening/modding/releasing the pbl with the dynamically changed datawindow in
it.

So far, outside of some GPFs caused by shared objects & changing the lib list,
everything is working.

PB is great when it's working right, but when it fails, it can take some really
creative thinking to overcome the problems.