ComponentOne True DataControl 8.0
XTabColumns Property (Field)

For crosstab fields, list of key values and column names defining columns (fields) generated by the crosstab field.

Syntax

Field.XTabColumns = string

Remarks

Read/Write at design time and at run time. Property applies to TDataLite control. Not available in TData control.

This property applies to crosstab mode. Setting it to a non-empty string, you define a fields as a crosstab field. The property values must obey special syntax rules allowing to specify a list of crosstab values. Every value in the list generates a column (a special field, so called crosstab column) at run time, with a name also specified in the list.

An XTabColumns string consists of column definitions separated with semicolons. Each column definition has a key expression and a column name:

<key expression>:<column name>

<key expression> is a valid TData expression. Usually, it is just a constant. Don’t forget to enclose it in double quotes if it is a string expression.

<column name> is a string defining the name of the crosstab column. You don’t have to double quote field names.

If you have multiple column key fields, the column definition syntax is slightly different. You must supply a valid TData expression (usually, constant) for every column key field, and separate them with colons:

<key expression1>,…,<key expressionN>:<column name>

Example of a single column key field, Month:

1:Jan;2:Feb;3:Mar;4:Apr;5:May;6:Jun;7:Jul;8:Aug;9:Sep;10:Oct;11:Nov;12:Dec

Example of multiple column key fields, Country,Year:

“US”,1999:U.S. 1999;”US”,2000:U.S. 2000;”Canada”,1999:Canada 1999; ”Canada”,2000:Canada 2000

Notice double quotes in constant key expression (you always must enclose constant string expressions in double or single quotes) and the absence of quotes in the column name (it is not an expression, just a string).

For more information, see Crosstab (matrix) data presentation.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback