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.

Dynamic Columns within a DataWindow

2 posts in DataWindow Last posting was on 2009-01-22 13:29:29.0Z
Divs Posted on 2009-01-22 11:47:25.0Z
From: Divs <divya0106@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Dynamic Columns within a DataWindow
Date: Thu, 22 Jan 2009 03:47:25 -0800 (PST)
Organization: http://groups.google.com
Lines: 33
Message-ID: <c0a9d02f-b335-4368-a804-b69a8e07da77@q36g2000vbn.googlegroups.com>
NNTP-Posting-Host: 199.64.0.252
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1232624846 19046 127.0.0.1 (22 Jan 2009 11:47:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 22 Jan 2009 11:47:26 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: q36g2000vbn.googlegroups.com; posting-host=199.64.0.252; posting-account=1wXZUwoAAABRt_2rPQEbgseoWWU8en6O
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!q36g2000vbn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88657
Article PK: 417911

Hello to the Forum and PB Experts out there!!!!

My requirement is:

there are columns say year1, year2,...........ColA, ColB

Year1, Year2, ColA, ColB are static columns.

I need to insert new columns in between columns year2 and ColA.

these new columns are year values. Suppose i am generating the report
in 2010, i should be able to fetch the rows for:

year1 - 2007
year2 - 2008
year3 - 2009
year4 - 2010

if its in 2015, then i have to start from
2007,2008,2009,2010......2014,2015.

so from year3 till the number of years (not known), i have to
generate.

Kindly tell me a suitable method to do so.

Also i have been asked to use Stored Procedure.
If you can suggest me how to insert these columns dynamically, i will
be really grateful.

Thanks,
Divs.


Chris Werner Posted on 2009-01-22 13:29:29.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <c0a9d02f-b335-4368-a804-b69a8e07da77@q36g2000vbn.googlegroups.com>
Subject: Re: Dynamic Columns within a DataWindow
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
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: <497874b9@forums-1-dub>
Date: 22 Jan 2009 05:29:29 -0800
X-Trace: forums-1-dub 1232630969 10.22.241.152 (22 Jan 2009 05:29:29 -0800)
X-Original-Trace: 22 Jan 2009 05:29:29 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88658
Article PK: 417912

Hi Divs,

I'd avoid much twiddling with dynamic column generation
in this case. Make a static datawindow with enough column
until lets say 2020 and hide them as needed using the visible
property. If the datawindow is grid style ColA, ColB will
be proper placed automatically. Otherwise you have to
modify their x coordinate.
If by any chance the product is in use 2019 it should be
easy to extend it for the next 10 years.

HTH

Chris Werner
f+s software gmbh


"Divs" <divya0106@gmail.com> schrieb im Newsbeitrag
news:c0a9d02f-b335-4368-a804-b69a8e07da77@q36g2000vbn.googlegroups.com...

> Hello to the Forum and PB Experts out there!!!!
>
> My requirement is:
>
> there are columns say year1, year2,...........ColA, ColB
>
> Year1, Year2, ColA, ColB are static columns.
>
> I need to insert new columns in between columns year2 and ColA.
>
> these new columns are year values. Suppose i am generating the report
> in 2010, i should be able to fetch the rows for:
>
> year1 - 2007
> year2 - 2008
> year3 - 2009
> year4 - 2010
>
> if its in 2015, then i have to start from
> 2007,2008,2009,2010......2014,2015.
>
> so from year3 till the number of years (not known), i have to
> generate.
>
> Kindly tell me a suitable method to do so.
>
> Also i have been asked to use Stored Procedure.
> If you can suggest me how to insert these columns dynamically, i will
> be really grateful.
>
> Thanks,
> Divs.
>