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.

Tabular Datawindow

6 posts in DataWindow Last posting was on 2008-10-08 16:23:31.0Z
Ahmad Alhowaimel Posted on 2008-10-05 13:14:50.0Z
Sender: 601d.48e8bc1f.1804289383@sybase.com
From: Ahmad Alhowaimel
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Tabular Datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48e8bdc9.608c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Oct 2008 06:14:50 -0700
X-Trace: forums-1-dub 1223212490 10.22.241.41 (5 Oct 2008 06:14:50 -0700)
X-Original-Trace: 5 Oct 2008 06:14:50 -0700, 10.22.241.41
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87912
Article PK: 417172

Hi there

I'm using Powerbuilder 9
i want to display the family name and total for person in
every each family in seperated area ,and i want to display
it as column by 4 family names in every row
i did group by area then i did group by family name
and the newpaper column acroos is 4
it's give me the correct data but it's contunes the data for
the column even the family is not in the area

so can any one help me how i solve the problem

With My best Regards
Ahmad Alhowaimel


Paul Horan[Sybase] Posted on 2008-10-06 05:05:34.0Z
From: "Paul Horan[Sybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48e8bdc9.608c.1681692777@sybase.com>
Subject: Re: Tabular Datawindow
Lines: 26
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: <48e99c9e@forums-1-dub>
Date: 5 Oct 2008 22:05:34 -0700
X-Trace: forums-1-dub 1223269534 10.22.241.152 (5 Oct 2008 22:05:34 -0700)
X-Original-Trace: 5 Oct 2008 22:05:34 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87914
Article PK: 417171

If you could post table CREATE statements and a sample of what output you're
looking for, that would be more helpful.

And which DBMS are you using?

Paul Horan[Sybase]

<Ahmad Alhowaimel> wrote in message
news:48e8bdc9.608c.1681692777@sybase.com...
> Hi there
>
> I'm using Powerbuilder 9
> i want to display the family name and total for person in
> every each family in seperated area ,and i want to display
> it as column by 4 family names in every row
> i did group by area then i did group by family name
> and the newpaper column acroos is 4
> it's give me the correct data but it's contunes the data for
> the column even the family is not in the area
>
> so can any one help me how i solve the problem
>
> With My best Regards
> Ahmad Alhowaimel


Ahmad Alhowaimel Posted on 2008-10-06 10:45:14.0Z
Sender: 7ae0.48e9ea57.1804289383@sybase.com
From: Ahmad Alhowaimel
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Tabular Datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48e9ec3a.7b20.1681692777@sybase.com>
References: <48e99c9e@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Oct 2008 03:45:14 -0700
X-Trace: forums-1-dub 1223289914 10.22.241.41 (6 Oct 2008 03:45:14 -0700)
X-Original-Trace: 6 Oct 2008 03:45:14 -0700, 10.22.241.41
Lines: 52
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87919
Article PK: 417174

i have a table like this
serial_no int
...
...
...
family_name vchar(30)

i'm looking for the output like this :

Area : area 1
Family Name Total Family Name Total
----------- ----- ----------- -----
Family 1 5 Family 2 6
Family 3 10 Family 4 8

Area : area 2
Family Name Total Family Name Total
----------- ----- ----------- -----
Family 1 3 Family 2 1
Family 3 12 Family 4 0

and so on

i used ODBC as my DBMS

> If you could post table CREATE statements and a sample of
> what output you're looking for, that would be more
> helpful.
>
> And which DBMS are you using?
>
> Paul Horan[Sybase]
>
> <Ahmad Alhowaimel> wrote in message
> news:48e8bdc9.608c.1681692777@sybase.com...
> > Hi there
> >
> > I'm using Powerbuilder 9
> > i want to display the family name and total for person
> > in every each family in seperated area ,and i want to
> > display it as column by 4 family names in every row
> > i did group by area then i did group by family name
> > and the newpaper column acroos is 4
> > it's give me the correct data but it's contunes the data
> > for the column even the family is not in the area
> >
> > so can any one help me how i solve the problem
> >
> > With My best Regards
> > Ahmad Alhowaimel
>
>


Paul Horan[Sybase] Posted on 2008-10-06 13:19:40.0Z
From: "Paul Horan[Sybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48e99c9e@forums-1-dub> <48e9ec3a.7b20.1681692777@sybase.com>
Subject: Re: Tabular Datawindow
Lines: 85
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: <48ea106c@forums-1-dub>
Date: 6 Oct 2008 06:19:40 -0700
X-Trace: forums-1-dub 1223299180 10.22.241.152 (6 Oct 2008 06:19:40 -0700)
X-Original-Trace: 6 Oct 2008 06:19:40 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87924
Article PK: 417181

If you're sure there are only four "families", then you can do this in SQL.
Then you would place the four family name/total pairs in the detail band
where you like them.

Select
area_name,
max( if family_name = 'Family 1' then 'Family 1' else '' endif) as
family1,
sum(( if family_name = 'Family 1' then 1 else 0 endif) * serial_no ) as
fam_1_total,
max( if family_name = 'Family 2' then 'Family 1' else '' endif) as
family2,
sum(( if family_name = 'Family 2' then 1 else 0 endif) * serial_no ) as
fam_2_total,
max( if family_name = 'Family 3' then 'Family 1' else '' endif) as
family3,
sum(( if family_name = 'Family 3' then 1 else 0 endif) * serial_no ) as
fam_3_total,
max( if family_name = 'Family 4' then 'Family 1' else '' endif) as
family4,
sum(( if family_name = 'Family 4' then 1 else 0 endif) * serial_no ) as
fam_4_total
from
some_table_whose_name_wasnt_provided
group by area_name
order by area_name ;

Paul Horan[Sybase]

<Ahmad Alhowaimel> wrote in message
news:48e9ec3a.7b20.1681692777@sybase.com...
>i have a table like this
> serial_no int
> ...
> ...
> ...
> family_name vchar(30)
>
> i'm looking for the output like this :
>
> Area : area 1
> Family Name Total Family Name Total
> ----------- ----- ----------- -----
> Family 1 5 Family 2 6
> Family 3 10 Family 4 8
>
> Area : area 2
> Family Name Total Family Name Total
> ----------- ----- ----------- -----
> Family 1 3 Family 2 1
> Family 3 12 Family 4 0
>
> and so on
>
> i used ODBC as my DBMS
>
>> If you could post table CREATE statements and a sample of
>> what output you're looking for, that would be more
>> helpful.
>>
>> And which DBMS are you using?
>>
>> Paul Horan[Sybase]
>>
>> <Ahmad Alhowaimel> wrote in message
>> news:48e8bdc9.608c.1681692777@sybase.com...
>> > Hi there
>> >
>> > I'm using Powerbuilder 9
>> > i want to display the family name and total for person
>> > in every each family in seperated area ,and i want to
>> > display it as column by 4 family names in every row
>> > i did group by area then i did group by family name
>> > and the newpaper column acroos is 4
>> > it's give me the correct data but it's contunes the data
>> > for the column even the family is not in the area
>> >
>> > so can any one help me how i solve the problem
>> >
>> > With My best Regards
>> > Ahmad Alhowaimel
>>
>>


Ahmad Alhowaimel Posted on 2008-10-08 06:05:59.0Z
Sender: 7ae0.48e9ea57.1804289383@sybase.com
From: Ahmad Alhowaimel
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Tabular Datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48ec4dc7.3bb8.1681692777@sybase.com>
References: <48ea106c@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Oct 2008 23:05:59 -0700
X-Trace: forums-1-dub 1223445959 10.22.241.41 (7 Oct 2008 23:05:59 -0700)
X-Original-Trace: 7 Oct 2008 23:05:59 -0700, 10.22.241.41
Lines: 93
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87947
Article PK: 417203

Hi Paul Horan
thank you for youe replying
the family in table is about 5000 not only 4 that was i gave
you as example

With My best Regards
Ahmad Alhowaimel

> If you're sure there are only four "families", then you
> can do this in SQL. Then you would place the four family
> name/total pairs in the detail band where you like them.
>
> Select
> area_name,
> max( if family_name = 'Family 1' then 'Family 1' else ''
> endif) as family1,
> sum(( if family_name = 'Family 1' then 1 else 0 endif) *
> serial_no ) as fam_1_total,
> max( if family_name = 'Family 2' then 'Family 1' else ''
> endif) as family2,
> sum(( if family_name = 'Family 2' then 1 else 0 endif) *
> serial_no ) as fam_2_total,
> max( if family_name = 'Family 3' then 'Family 1' else ''
> endif) as family3,
> sum(( if family_name = 'Family 3' then 1 else 0 endif) *
> serial_no ) as fam_3_total,
> max( if family_name = 'Family 4' then 'Family 1' else ''
> endif) as family4,
> sum(( if family_name = 'Family 4' then 1 else 0 endif) *
> serial_no ) as fam_4_total
> from
> some_table_whose_name_wasnt_provided
> group by area_name
> order by area_name ;
>
> Paul Horan[Sybase]
>
> <Ahmad Alhowaimel> wrote in message
> news:48e9ec3a.7b20.1681692777@sybase.com...
> >i have a table like this
> > serial_no int
> > ...
> > ...
> > ...
> > family_name vchar(30)
> >
> > i'm looking for the output like this :
> >
> > Area : area 1
> > Family Name Total Family Name Total
> > ----------- ----- ----------- -----
> > Family 1 5 Family 2 6
> > Family 3 10 Family 4 8
> >
> > Area : area 2
> > Family Name Total Family Name Total
> > ----------- ----- ----------- -----
> > Family 1 3 Family 2 1
> > Family 3 12 Family 4 0
> >
> > and so on
> >
> > i used ODBC as my DBMS
> >
> >> If you could post table CREATE statements and a sample
> of >> what output you're looking for, that would be more
> >> helpful.
> >>
> >> And which DBMS are you using?
> >>
> >> Paul Horan[Sybase]
> >>
> >> <Ahmad Alhowaimel> wrote in message
> >> news:48e8bdc9.608c.1681692777@sybase.com...
> >> > Hi there
> >> >
> >> > I'm using Powerbuilder 9
> >> > i want to display the family name and total for
> person >> > in every each family in seperated area ,and i
> want to >> > display it as column by 4 family names in
> every row >> > i did group by area then i did group by
> family name >> > and the newpaper column acroos is 4
> >> > it's give me the correct data but it's contunes the
> data >> > for the column even the family is not in the
> area >> >
> >> > so can any one help me how i solve the problem
> >> >
> >> > With My best Regards
> >> > Ahmad Alhowaimel
> >>
> >>
>
>


Terry Dykstra [TeamSybase] Posted on 2008-10-08 16:23:31.0Z
Reply-To: "Terry Dykstra [TeamSybase]" <dontreply_tddykstra@forestoil.ca.x>
From: "Terry Dykstra [TeamSybase]" <tddykstra@forestoil.ca>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48ea106c@forums-1-dub> <48ec4dc7.3bb8.1681692777@sybase.com>
Subject: Re: Tabular Datawindow
Lines: 107
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.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ecde83$1@forums-1-dub>
Date: 8 Oct 2008 09:23:31 -0700
X-Trace: forums-1-dub 1223483011 10.22.241.152 (8 Oct 2008 09:23:31 -0700)
X-Original-Trace: 8 Oct 2008 09:23:31 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87949
Article PK: 417206

How about a nested report, with the main report having the area in the
detail band and the nested report having the newspaper style families.

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

<Ahmad Alhowaimel> wrote in message
news:48ec4dc7.3bb8.1681692777@sybase.com...
> Hi Paul Horan
> thank you for youe replying
> the family in table is about 5000 not only 4 that was i gave
> you as example
>
> With My best Regards
> Ahmad Alhowaimel
>
>> If you're sure there are only four "families", then you
>> can do this in SQL. Then you would place the four family
>> name/total pairs in the detail band where you like them.
>>
>> Select
>> area_name,
>> max( if family_name = 'Family 1' then 'Family 1' else ''
>> endif) as family1,
>> sum(( if family_name = 'Family 1' then 1 else 0 endif) *
>> serial_no ) as fam_1_total,
>> max( if family_name = 'Family 2' then 'Family 1' else ''
>> endif) as family2,
>> sum(( if family_name = 'Family 2' then 1 else 0 endif) *
>> serial_no ) as fam_2_total,
>> max( if family_name = 'Family 3' then 'Family 1' else ''
>> endif) as family3,
>> sum(( if family_name = 'Family 3' then 1 else 0 endif) *
>> serial_no ) as fam_3_total,
>> max( if family_name = 'Family 4' then 'Family 1' else ''
>> endif) as family4,
>> sum(( if family_name = 'Family 4' then 1 else 0 endif) *
>> serial_no ) as fam_4_total
>> from
>> some_table_whose_name_wasnt_provided
>> group by area_name
>> order by area_name ;
>>
>> Paul Horan[Sybase]
>>
>> <Ahmad Alhowaimel> wrote in message
>> news:48e9ec3a.7b20.1681692777@sybase.com...
>> >i have a table like this
>> > serial_no int
>> > ...
>> > ...
>> > ...
>> > family_name vchar(30)
>> >
>> > i'm looking for the output like this :
>> >
>> > Area : area 1
>> > Family Name Total Family Name Total
>> > ----------- ----- ----------- -----
>> > Family 1 5 Family 2 6
>> > Family 3 10 Family 4 8
>> >
>> > Area : area 2
>> > Family Name Total Family Name Total
>> > ----------- ----- ----------- -----
>> > Family 1 3 Family 2 1
>> > Family 3 12 Family 4 0
>> >
>> > and so on
>> >
>> > i used ODBC as my DBMS
>> >
>> >> If you could post table CREATE statements and a sample
>> of >> what output you're looking for, that would be more
>> >> helpful.
>> >>
>> >> And which DBMS are you using?
>> >>
>> >> Paul Horan[Sybase]
>> >>
>> >> <Ahmad Alhowaimel> wrote in message
>> >> news:48e8bdc9.608c.1681692777@sybase.com...
>> >> > Hi there
>> >> >
>> >> > I'm using Powerbuilder 9
>> >> > i want to display the family name and total for
>> person >> > in every each family in seperated area ,and i
>> want to >> > display it as column by 4 family names in
>> every row >> > i did group by area then i did group by
>> family name >> > and the newpaper column acroos is 4
>> >> > it's give me the correct data but it's contunes the
>> data >> > for the column even the family is not in the
>> area >> >
>> >> > so can any one help me how i solve the problem
>> >> >
>> >> > With My best Regards
>> >> > Ahmad Alhowaimel
>> >>
>> >>
>>
>>