CrossTab Datawindows and Getting the Column Names

Hi, 
I'm kind of new to the Crosstab Datawindow.  Currently,
we are trying to develop a Crosstab Datawindow to show a grid similar to:

          Extra Small    Small   Medium   Large   Extra Large
Blue                1
Red                                            1
Green                        1
Yellow                                                       1

with empty boes to type in.  This would be used when someone is taking an 
order for shirts, for example.  I can pretty much get this far.  My problem 
is when I am trying to get the name for the Columns.  I am using the 
following SQL Select:

Select 'isc_size' = case when  tblInventoryDimension.idm_dimension_code = 
'1'
then dva_value_description
end, 
tblDimensionValue.idm_dimension_code,
dva_value_sequence,
'isc_color' = case when 
tblInventoryDimension.idm_dimension_code = '2'
then dva_value_description
end,
'qty' = '1'
from tblDimensionValue, 
        tblInventoryDimension
where tblInventoryDimension.idm_matrix_position in ( '1', '2' ) AND
        tblInventoryDimension.own_owner_code = 
tblDimensionValue.own_owner_code AND
        tblInventoryDimension.inp_short_item_number = 
tblDimensionValue.inp_short_item_number AND
        tblInventoryDimension.idm_dimension_code = 
tblDimensionValue.idm_dimension_code AND
        tblInventoryDimension.own_owner_code = 'ES' AND
        tblInventoryDimension.inp_short_item_number = 'DUCKS'
order by tblDimensionValue.idm_dimension_code, 
tblDimensionValue.dva_value_sequence

and so I get a field called qty_t with Text of: @isc_size for the Columns. 
When I refer to this field, I get back the '@isc_size' instead of the text 
it translates to.

I can't use Static mode since everytime this datawindow is retrieved, these 
columns could be different.

Any help would be greatly appreciated!
Thanks and everyone have a great weekend.
Shannon
0
Shannon
5/3/2002 10:25:23 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

1 Replies
609 Views

Similar Articles

[PageSpeed] 59

Check the case statement syntax.  The case statement in ASA will come like
this:

SELECT
(
CASE {<Column Name>}
WHEN <Value 1> {or Expression 1}> then <Result 1>
WHEN <Value 2> {or Expression 2}> then <Result 2>
WHEN <Value 3> {or Expression 3}> then <Result 3>
ELSE   'Result 4'
END
) as <Alias Name>

FROM <Table Name>

<Shannon> wrote in message
news:FFF16D87796FDA74007B2C5185256BAE.007B2C8185256BAE@webforums...
> Hi,
> I'm kind of new to the Crosstab Datawindow.  Currently,
> we are trying to develop a Crosstab Datawindow to show a grid similar to:
>
>           Extra Small    Small   Medium   Large   Extra Large
> Blue                1
> Red                                            1
> Green                        1
> Yellow                                                       1
>
> with empty boes to type in.  This would be used when someone is taking an
> order for shirts, for example.  I can pretty much get this far.  My
problem
> is when I am trying to get the name for the Columns.  I am using the
> following SQL Select:
>
> Select 'isc_size' = case when  tblInventoryDimension.idm_dimension_code =
> '1'
> then dva_value_description
> end,
> tblDimensionValue.idm_dimension_code,
> dva_value_sequence,
> 'isc_color' = case when
> tblInventoryDimension.idm_dimension_code = '2'
> then dva_value_description
> end,
> 'qty' = '1'
> from tblDimensionValue,
>         tblInventoryDimension
> where tblInventoryDimension.idm_matrix_position in ( '1', '2' ) AND
>         tblInventoryDimension.own_owner_code =
> tblDimensionValue.own_owner_code AND
>         tblInventoryDimension.inp_short_item_number =
> tblDimensionValue.inp_short_item_number AND
>         tblInventoryDimension.idm_dimension_code =
> tblDimensionValue.idm_dimension_code AND
>         tblInventoryDimension.own_owner_code = 'ES' AND
>         tblInventoryDimension.inp_short_item_number = 'DUCKS'
> order by tblDimensionValue.idm_dimension_code,
> tblDimensionValue.dva_value_sequence
>
> and so I get a field called qty_t with Text of: @isc_size for the Columns.
> When I refer to this field, I get back the '@isc_size' instead of the text
> it translates to.
>
> I can't use Static mode since everytime this datawindow is retrieved,
these
> columns could be different.
>
> Any help would be greatly appreciated!
> Thanks and everyone have a great weekend.
> Shannon


0
Arul
5/4/2002 11:34:17 AM
Reply:

Similar Artilces:

How can I get the column name of a datawindow column?
I want to get the column name in tablename.columnname format. I have tried to get it using dbname property. However, I found that it work only if the tables in the datawindow are inner join. If the tables in the datawindow are outer join, the dbname only return the columnname and the tablename is missed. Do you have any idea? Charles You could add the name to the select clause or to the tag property. Or you caould check to see if it is a join or not (by seeing if there is a '.' in the column name) if not then get the sql select statment and parse to find the table...

Getting Datawindow name from datawindow child variable
Hi ! I want to get the datawindow (name) from a datawindowchild variable. But, the dwc has no way to get it. I want the code like this : datawindowchild dwc dw_1.getchild("colname", dwc) dw_2.dataobject = dwc.dataobject -------------- -> X In the above code, "dw_1.object.colname.dddw.name" is what I want. But, from the "dwc", I can't know that. Please, help! thx. You're correct. There is no way to get the datawindow name from the datawindow child, you have to ask the paren...

How does a datawindow column get its name?
Q: How does a column get its name? Pretext: Datawindow is built using Tabular - SQL Select - and Converted to Syntax. On existing datawindow - the column names have been modified to strip off the table names (so table name "company" was stripped from column name "company_code" to make it as just "code"). Change: I was changing this existing datawindow - adding one another column. After adding the column into the SQL-SELECT, the datawindow display warning message as "SELECT change has forced update specification change" ( I have update pro...

how to get all the column names from datawindow
I would like to get all the column names from datawindow. any help apppreciated TIA //1. Column names Int li_col_count, ls_columns[] li_col_count = integer(idw.Describe("DataWindow.Column.Count")) FOR i = 1 TO li_col_count ls_columns[i] = idw.Describe("#" + String(i) + ".Name") Next //2. If you need to include CF's look at the Object.DataWindow.Objects string (tab separated) and parse it back to an array of DW objects. hth > I would like to get all the column names from datawindow. > > any help apppreciated > TIA...

How to get crosstab datawindow column value
my problem How to get crosstab datawindow column value Hi Wisdom, Try dot notation. There is a good possibility to show data as well: MessageBox( "Data", dw_Crosstab.Describe( "DataWindow.Data" ) ) Alexander Wisdom Pan schrieb: > my problem > > How to get crosstab datawindow column value don't forget to set the statis property to TRUE, before trying to access the dynamically generated columns. "Wisdom Pan" <pan_steve@hotmail.com> wrote in message news:jB9UYNty$GA.110@forums.sybase.com... my problem How to g...

How to get Column names from dynamic Datawindow?
Attached is a piece of code that opens a datastore based on a datawindow which is itself based on a stored procedure that takes two parameters. There are two records in the dataset. The problem is thus: this code will be customized in each application but the "linked" list it will be stored in is part of a PFC service that will not know the number/names of fields until run time. That code is generic and creates the initial linked list from records stored in a table that "defines" the number/names of fields. Since the code must not make any assumptions about the ...

DataWindow This, DataWindow That...
Blah blah blah You've heard it enough that you don't even want to comment on how many times... The DataWindow. ....but it can't be enough anymore...can it? This from one of our colleagues (and yes my apologies for taking it out of context)... "...PB covers all you need to do that in ONE Tool. This includes Windowprogramming ( meaning the interface to the user: Windows, Sheets, diallougeboxes, etc.), Database operability AND Reporting! Well, I see als well as many other PB users that some of the implementations and features PB offers are improvable. But thi...

Crosstab datawindow column header names ???
I am trying to read column header values of a crosstab datawindow : - I tried GetItemString ( ), but what are the names of the text header fields : I only got the column name defined at design time. - A Describe ( "DataWindow.Crosstab.Columns" ) also give me names at design time. Thank you for your ideas... IIIP wrote: > > I am trying to read column header values of a crosstab datawindow : > - I tried GetItemString ( ), but what are the names of the text header fields : I only got the column name > defined at design time. > - A Describe ( "DataWindow....

Get Value of column dynamic of datawindow crosstab
Hello to all. I have datawindow crosstab and I need to obtain the value of the generated columns . Thanks! Hola a todos. Tengo un datawindow crosstab y necesito obtener el valor de las columnas generadas dinamicamente Read the thread started by Davy De Permentier with the subject "CrossTab" on friday. "Raul Gil" <gl_ra@hotmail.com> wrote in message news:414f86f2$1@forums-1-dub... > Hello to all. > > I have datawindow crosstab and I need to obtain the value of the > generated columns . > > Thanks! > &...

datawindow.column.count not returning the column count of a datawindow
I am having problems with the datawindow.column.count property of a datawindow. It just started happening with PB 6.501 and still works fine in PB 5.0. The function that looks at this property is in an ancestor userobject. The dataobject is assigned at this point but all other properties of the datawindow are missing. Any suggestions? Don't recall, but was it still dwDescribe() in version 5.0? If it was that may be your problem. HTH Kent Montgomery wrote: > I am having problems with the datawindow.column.count property of a > datawindow. It just started happenin...

CrossTab Datawindow and Datawindow plugin
Does anyone know of any problems using the Datawindow plug-in and a crosstab presentation sytle. I'm using web.pb to call my distributed PB server and save the crosstab as a psr file and then return the html pointing to the psr file. The computed fields are getting overlaid but doing it from PowerBuilder works fine. I'm using PB 6.5 Thanks, Bill Anderson ...

Getting column's header in a Crosstab datawindow
Hi !! My problem is as follows I have made a cross tab datawindow. In that i want to change the column headers at runtime. How could i get cloumn header name(it will vary at runtime) and change it at runtime. One thing is that i can't use column expression because i have to get the value from other table. Thanks in advance. Dharani Babu adharani@ssind.stpn.soft.net ...

datawindow column names and multi-table datawindows 5.0.04 -> 6.5
Has anybody out there noticed problems with the dynamic creation of multi-table datawindows and referring to the datawindow columns? In 5.0.04 PowerBuilder automatically prefixed each datawindow column with the table name(e.g. table_name_column_name). This is now broken in PB 6.5. Why did this change in 6.5? What necessitated this change so that all Sybase customers are forced to perform costly regression testing on PowerBuilder applications? Windows 95 PB Enterprise 6.5 ODBC - any dbms( Sql Any, MS SQL, Oracle, Sybase ASE, Quadbase ) ...

DataWindow.NET
I'm using DataWindow.NET 1.5.1 9004 on a Windows XP Professional SP 2 machine with the latest Microsoft Update patches. The release notes indicate that change request 385532 is corrected. However, if I configure my computer to use a Windows XP theme the border does not render as expected; a blue bordered box is displayed. If I configure my computer to use a Windows Classic theme the border is rendered as expected. Is there something else I need to do to get the datawindow object column borders to render correctly when using a Windows XP theme? Ken Are you using 3D Lower...

Web resources about - CrossTab Datawindows and Getting the Column Names - sybase.powerbuilder.datawindow

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 11/21/2015 9:49:25 PM