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.

problem(s) with setseriesstyle

3 posts in DataWindow Last posting was on 2008-09-12 16:05:06.0Z
Marc Schmidtmayer Posted on 2008-09-12 06:08:54.0Z
Sender: 3fce.48ca049c.1804289383@sybase.com
From: Marc Schmidtmayer
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: problem(s) with setseriesstyle
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48ca0776.4045.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 Sep 2008 23:08:54 -0700
X-Trace: forums-1-dub 1221199734 10.22.241.41 (11 Sep 2008 23:08:54 -0700)
X-Original-Trace: 11 Sep 2008 23:08:54 -0700, 10.22.241.41
Lines: 36
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87750
Article PK: 417005

Hi,
I like to change the colors on a graph (using
'setseriesstyle') but I have problems with this.
Whenever the datawindow is of a 'graph'-type, the
'setseriesstyle'-function works.
But, whenever I do the same on a 'freeform'-type datawindow
with a graph inside ... it doesn't work and I get an error
(rc -1).
The name of the graph in both datawindows is the same.
The datawindow is 'filled' using sharedata.

Here's the code :

dw_print.dataobject = dw_report.dataobject + PRINT_EXTENSION
dw_print.of_settransobject(SQLCA)
dw_report.sharedata(dw_print)

dw_print.modify(MODIFY_GRAPH_ACTIVITY)

dw_print.setseriesstyle("gr_graph",
THIS.inv_srv.is_serie[1], Foreground!,
THIS.inv_srv.il_serie_color[1]))

gnv_app.inv_print.of_print(dw_print)
dw_print.sharedataoff()

So, 'dw_report.dataobject + PRINT_EXTENSION' --> freeform
datawindow with a graph inside it.
When I use the same dw (=dw_print.dataobject =
dw_report.dataobject) (which is a 'graph'-type datawindow)
.. then it works.

Anyone any ideas ?
Using a event mapped to 'pbm_dwngraphcreate' doesn't help.

Thanks.


"John Olson [Team Sybase]" <john.olson Posted on 2008-09-12 16:05:06.0Z
From: "John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48ca0776.4045.1681692777@sybase.com>
Subject: Re: problem(s) with setseriesstyle
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ca9332@forums-1-dub>
Date: 12 Sep 2008 09:05:06 -0700
X-Trace: forums-1-dub 1221235506 10.22.241.152 (12 Sep 2008 09:05:06 -0700)
X-Original-Trace: 12 Sep 2008 09:05:06 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87754
Article PK: 417008

Also, have you tried applying the style change before you ShareData?

Regards,
John

<Marc Schmidtmayer> wrote in message
news:48ca0776.4045.1681692777@sybase.com...
> Hi,
> I like to change the colors on a graph (using
> 'setseriesstyle') but I have problems with this.
> Whenever the datawindow is of a 'graph'-type, the
> 'setseriesstyle'-function works.
> But, whenever I do the same on a 'freeform'-type datawindow
> with a graph inside ... it doesn't work and I get an error
> (rc -1).
> The name of the graph in both datawindows is the same.
> The datawindow is 'filled' using sharedata.
>
> Here's the code :
>
> dw_print.dataobject = dw_report.dataobject + PRINT_EXTENSION
> dw_print.of_settransobject(SQLCA)
> dw_report.sharedata(dw_print)
>
> dw_print.modify(MODIFY_GRAPH_ACTIVITY)
>
> dw_print.setseriesstyle("gr_graph",
> THIS.inv_srv.is_serie[1], Foreground!,
> THIS.inv_srv.il_serie_color[1]))
>
> gnv_app.inv_print.of_print(dw_print)
> dw_print.sharedataoff()
>
> So, 'dw_report.dataobject + PRINT_EXTENSION' --> freeform
> datawindow with a graph inside it.
> When I use the same dw (=dw_print.dataobject =
> dw_report.dataobject) (which is a 'graph'-type datawindow)
> .. then it works.
>
> Anyone any ideas ?
> Using a event mapped to 'pbm_dwngraphcreate' doesn't help.
>
> Thanks.


"John Olson [Team Sybase]" <john.olson Posted on 2008-09-12 15:58:49.0Z
From: "John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48ca0776.4045.1681692777@sybase.com>
Subject: Re: problem(s) with setseriesstyle
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ca91b9$1@forums-1-dub>
Date: 12 Sep 2008 08:58:49 -0700
X-Trace: forums-1-dub 1221235129 10.22.241.152 (12 Sep 2008 08:58:49 -0700)
X-Original-Trace: 12 Sep 2008 08:58:49 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87752
Article PK: 417010

I have a series of questions (no pun intended :)

1. is everything except the series color correct in your print DW?
Your snippet doesn't have any code checking so I'm curious if everything
else, such as sharedata, is functioning correctly prior to the
SetSeriesStyle call.
2. are you 100% sure is_serie[1] and il_serie_color[1] contain valid and
correct values?
3. do the exact same changes (ie modify_graph_activity) function without
error on the graph type DW?
If you use the exact same code in the graph dw as you do in the free from
with embedded graph then it should work the same.
4. have you tried putting dw_report.databoject into a composite and using
that to print?
If you can't get it working otherwise that would be an alternate way to
create your report format.

Regards,
John

<Marc Schmidtmayer> wrote in message
news:48ca0776.4045.1681692777@sybase.com...
> Hi,
> I like to change the colors on a graph (using
> 'setseriesstyle') but I have problems with this.
> Whenever the datawindow is of a 'graph'-type, the
> 'setseriesstyle'-function works.
> But, whenever I do the same on a 'freeform'-type datawindow
> with a graph inside ... it doesn't work and I get an error
> (rc -1).
> The name of the graph in both datawindows is the same.
> The datawindow is 'filled' using sharedata.
>
> Here's the code :
>
> dw_print.dataobject = dw_report.dataobject + PRINT_EXTENSION
> dw_print.of_settransobject(SQLCA)
> dw_report.sharedata(dw_print)
>
> dw_print.modify(MODIFY_GRAPH_ACTIVITY)
>
> dw_print.setseriesstyle("gr_graph",
> THIS.inv_srv.is_serie[1], Foreground!,
> THIS.inv_srv.il_serie_color[1]))
>
> gnv_app.inv_print.of_print(dw_print)
> dw_print.sharedataoff()
>
> So, 'dw_report.dataobject + PRINT_EXTENSION' --> freeform
> datawindow with a graph inside it.
> When I use the same dw (=dw_print.dataobject =
> dw_report.dataobject) (which is a 'graph'-type datawindow)
> .. then it works.
>
> Anyone any ideas ?
> Using a event mapped to 'pbm_dwngraphcreate' doesn't help.
>
> Thanks.