The list of all columns and their attributes.
Version Introduced: 3.0.2
Usage
Set_Property(OLECtrlEntID, "OLE.ColumnList", Array)
Values
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<0, 1> | Title | Text | The column's title text | Required |
<0, 2> | Type | Option | The column's expected data type | Required |
<0, 3> | Width | Integer | The column's initial width | Required |
<0, 4> | Autosized | Boolean | Is column autosizable flag | True |
<0, 5> | Resizable | Boolean | Is column resizable flag | same as Autosized |
<0, 6> | Image | Integer | The column's image | 0 |
<0, 7> | Sortable | Boolean | Can column be sorted flag | True |
<0, 8> | Visible | Boolean | Is column visible flag | True |
<0, 9> | MinWidth | Integer | The column's minimum allowed width | 0 |
<0, 10> | Alignment | Option | The column's data alignment | Left |
<0, 11> | Tool Tip | Text | The text to appear when the user hovers the cursor above the column's header | "" |
<0, 12> | Format | Text | The output format for the column's data | "" |
<0, 13> | Check Box | Boolean | Determines if the column has check boxes | False |
<0, 14> | Font | Font | The column's font | Tahoma, 8 pt. |
<0, 15> | Data Source | Option | Determines how to interpret column's items' values | Text |
<0, 16> | Check Box Alignment | Option | The column's check box alignment | Left |
<0, 17> | Hyperlink | Boolean | Determines if the column's items are hyperlinks | False |
Remarks
The ColumnList property establishes the physical report columns. This property has nothing to do with the actual data contained within the control. It simply creates columns that will eventually contain data. Thus, this property should be called before setting the data.
The ColumnList property is a dynamic array of fields, with each field representing one column in the table. There can be any number of fields, thus any number of columns. The multivalue structure above lists the format of each field. Here is a detailed description of each column value and their effects:
At least the first 3 values of each column are required. Omitting the remaining values will set them to the defaults listed below.
Title
The column's title is the text that will appear in the header cell at the top of the report table. This can be any string of any length. Text that does not fit in the header cell is truncated.
Type
The column's type establishes the expected type of data within the row. This value determines how the report table will sort, compare, and present data in a column. The following table lists the options available:
Value | Abbr. | Description |
---|---|---|
Text | T | The column contains plain text that is sorted alphabetically |
Number | N | The column contains numbers which are sorted numerically |
Date | D | The column contains dates (no times) which are sorted by date |
Time | TI | The column contains time (no dates) which are sorted by time of day |
DateTime | DT | The column contains dates and times which are sorted by date then time |
Bool | B | The column contains booleans which are sorted numerically (false = 0 and true = 1) |
Preview | P | The column contains plain text that may also be used as the preview (see below) |
Preview type columns are just like plain text column, however, they can also be displayed as text spanning accross the bottom of a record rather than in their own columns. This effect can be seen in Outlook 2003 when the first few sentences of an email are visible in each unread email.
There can only be one Preview column per table. If you specify more than one Preview column, then only the first preview column will be previewed while the other columns set to "preview" will simply act like plain text columns.
Width
The column's width is measured in pixels. This value determines the column's starting width. Later, when reading the ColumnList property, this value may be different if the user has resized the column.
Autosized (optional)
The column's Autosized flag determines if the column grows and shrinks automatically when the size of the Report Table changes. For columns whose Autosized flag is True the Report Table will ensure their altered sizes remain proportional to their original sizes. Omitting this value is the same as setting it to True. This property is ignored if HorizontalScroll is set.
Resizable (optional)
The column's Resizable flag determines if the column's width can be altered by the user. Set this value to False if you want the column to stay fixed at its initial width. Omitting this value will set it equal to the Autosized value.
Image (optional)
The column's Image is simply a numerical index to the image in the ImageList meant to appear in the column header. The ImageList property must have already been set for this value to work properly. A value of 0 indicates no image. Omitting this value will set the column to have no image.
Columns with images do not display any text no matter what you specify in the Title value. Thus, column headers can have images or text, but never both.
Sortable (optional)
The column's Sortable flag determines if the user is allowed to sort the column by clicking on the column header. If True, then the user can alternate between ascending or descending sort order by successively clicking the column header. Omitting this value is the same as setting it to True.
Visible (optional)
The column's Visible flag determines if the column is initially visible to the user. The user can later determine which columns they wish to see. Preview columns default to an invisible status since they will most likely appear underneath each row. Omitting this value is the same as setting it to True.
MinWidth (optional)
The column's MinWidth is the minimum width, in pixels, the user is allowed to set. This value is only used for resizable columns. Omitting this value is the same as setting it to 0.
Alignment (optional)
The column's alignment establishes whether or not the data in the column is justified to the left, center, or right. It has no bearing on how the data is sorted; thus, right justified data is still left-sorted. Here are the values you can use:
Value | Abbr. | Description |
---|---|---|
Left | L | Left justify data |
Center | C | Center justify data |
Right | R | Right justify data |
Tool Tip (optional)
The column's tooltip text is the text that will appear when the user hovers the mouse over the column's header for a short period of time. If empty, then no tooltip will appear. Use this when you want to provide a little extra info on the purpose of the column.
Format (optional)
The column's format determines how some column's data is displayed. This field does not apply to all columns. Futhermore, the syntax of this field depends upon the column Type. Listed below are the supported types and their respective Format syntax.
Text
You can format text, but you're limited to prefixes and suffixes. You can use any characters in the Format field, but the string "%S%" will always be swapped with the cell's contents. Any other character is treated as a literal and is displayed as is. Currently, there is no way to show "%S%" as a literal, i.e., it will alwaysbe swapped with the cell's contents.
To Display As | Use |
---|---|
First Name: Kevin | First Name: %S% |
Kevin Esquire | %S% Esquire |
Code guru Kevin works for SRP Computer Solutions, Inc. | Code guru %S% works for SRP Computer Solutions, Inc. |
Number
Numbers are stored as floating point values within the Report Table. Thus, if your data contains decimal values, make sure you include the decimal when you load the Report Table. In other words, there is no equivalent MD2 format for the Report Table. Instead, the Report Table uses an Excel-like syntax to format and round off decimal numbers.
You can use any characters in the Format field, but '#', '0', commas, and periods are reserved characters. Any other character is treated as a literal and is displayed as is. Thus, you may use literal characters in your format to prefix or suffix the data as you choose. If you need to use any reserved characters literally, then surround your literal text in single or double quotes. If you need to display quotes, place two of them side by side. The reserved characters are interpreted as follows:
Character | Displays |
---|---|
# | Significant Digits Only |
0 | Significant Digits or Insignificant Zeros |
comma | 1. If within the number, then commas separate every three digits |
2. If trailing the number, then the number is shown as an integer divided by 1000 for each trailing comma | |
period | Decimal point. The first decimal denotes the beginning of the fractional portion of the number. All subsequent decimals are treated as literals |
Here are some example number formats:
To Display | As | Use |
---|---|---|
1234.59 | 1234.6 | ####.# |
8.9 | 8.900 | #.000 |
.631 | 0.6 | 0.# |
44.398 | $44.40 | $0.00 |
1234.568 | $1,234.57 | $#,##0.00 |
5.25 | 5.25% | 0.00% |
12000 | 12,000 | #,### |
12000 | 12 | #, |
12200000 | 12.2 | 0.0,, |
Date
Dates are stored in a proprietary format within the Report Table. Currently, dates must be in OI's internal format when loading them into the Report Table. In other words, the Report Table will not parse string dates on your behalf. Like Numbers, the Report Table uses an Excel-like syntax to format dates.
You can use any characters in the Format field, but 'Y', 'y', 'M', 'm', 'D', and 'd' are reserved characters. Any other character is treated as a literal and is displayed as is. Thus, you may use literal characters in your format to prefix or suffix the data as you choose. If you need to use any reserved characters literally, then surround your literal text in single or double quotes. If you need to display quotes, place two of them side by side. The reserved characters are interpreted as follows:
Character(s) | Displays |
---|---|
YY | Years 00-99 |
YYYY | Years 0001-2999 |
M | Months 1-12 |
MM | Months 01-12 |
MMM | Months Jan-Dec |
MMMM | Months January-December |
MMMMM | Months J-D |
D | Days 1-31 |
DD | Days 01-31 |
DDD | Days Sun-Sat |
DDDD | Days Sunday-Saturday |
Only uppercase letters are used in the examples here, but lowercase are supported as well. However, uppercase is recommended because DateTime (below) uses capital 'M' to distinguish months from minutes.
Here are some example date formats, all them for the date January 1, 2006:
To Display As | Use |
---|---|
January 1, 2006 | MMMM D, YYYY |
Sunday, Jan 01, 2006 | DDDD, MMM DD, YYYY |
2006-01-01 | YYYY-MM-DD |
1/1/06 | M/D/YY |
Happy New Year! It's January 01! | "Happy New Year! It's" MMMM DD! |
Time
Times are stored in a proprietary format within the Report Table. Currently, times must be in OI's internal format when loading them into the Report Table. In other words, the Report Table will not parse string time on your behalf. The Report Table uses an Excel-like syntax to format dates.
You can use any characters in the Format field, but 'H', 'h', 'M', 'm', 'S', 's', 'A', 'a', and '0' are reserved characters. Any other character is treated as a literal and is displayed as is. Thus, you may use literal characters in your format to prefix or suffix the data as you choose. If you need to use any reserved characters literally, then surround your literal text in single or double quotes. If you need to display quotes, place two of them side by side. The reserved characters are interpreted as follows:
Character(s) | Displays |
---|---|
h | Hours 0-23 |
hh | Hours 00-23 |
m | Minutes 0-59 |
mm | Minutes 00-59 |
s | Seconds 0-59 |
ss | Seconds 00-59 |
0 | Milliseconds 0-9 (rounded to the nearest tenth) |
00 | Milliseconds 00-99 (rounded to the nearest hundredth) |
000 | Milliseconds 000-999 |
a | a/p |
aa | am/pm |
aaa | a.m./p.m. |
A | A/P |
AA | AM/PM |
AAA | A.M./P.M. |
Only lowercase letters are used in the examples here, but uppercase are supported as well. However, lowercase is recommended because DateTime (below) uses lowercase 'm' to distinguish minutes from months.
Here are some example time formats, all them for the time 3:30:30.345 PM:
To Display As | Use |
---|---|
3:30:30.345 PM | h:mm:ss.000 AA |
3:30:30.35 P.M. | h:mm:ss.00 AAA |
3:30:30.3 PM | h:mm:ss.0 AA |
03:30:30 P | hh:mm:ss A |
15:30:30 | h:mm:ss |
15:30 | h:mm |
The meeting is at 3:30pm | "The meeting is at" h:mmaa |
DateTime
DateTimes are stored in a proprietary format within the Report Table. Currently, date & times must be in OI's internal format when loading them into the Report Table. In other words, the Report Table will not parse string date & times on your behalf. Like individual Dates and Times, the Report Table uses an Excel-like syntax for formatting.
You can use any characters in the Format field, but 'Y', 'y', 'M', 'm', 'D', 'd', 'H', 'h', 'S', 's', 'A', 'a', and '0' are reserved characters. Any other character is treated as a literal and is displayed as is. Thus, you may use literal characters in your format to prefix or suffix the data as you choose. If you need to use any reserved characters literally, then surround your literal text in single or double quotes. If you need to display quotes, place two of them side by side. The reserved characters are interpreted as follows:
Character(s) | Displays |
---|---|
YY | Years 00-99 |
YYYY | Years 0001-2999 |
M | Months 1-12 |
MM | Months 01-12 |
MMM | Months Jan-Dec |
MMMM | Months January-December |
MMMMM | Months J-D |
D | Days 1-31 |
DD | Days 01-31 |
DDD | Days Sun-Sat |
DDDD | Days Sunday-Saturday |
h | Hours 0-23 |
hh | Hours 00-23 |
m | Minutes 0-59 |
mm | Minutes 00-59 |
s | Seconds 0-59 |
ss | Seconds 00-59 |
0 | Milliseconds 0-9 (rounded to the nearest tenth) |
00 | Milliseconds 00-99 (rounded to the nearest hundredth) |
000 | Milliseconds 000-999 |
a | a/p |
aa | am/pm |
aaa | a.m./p.m. |
A | A/P |
AA | AM/PM |
AAA | A.M./P.M. |
Note that 'M' must be used for months and 'm' for minutes. All other codes can be either case.
Here are some example date & time formats, all them for the date & time January 1, 2006 at 3:30:30.245 PM:
To Display As | Use |
---|---|
January 1, 2006 at 3:30 PM | MMMM D, YYYY 'at' h:mm aa |
Sunday, Jan 01, 2006 | DDDD, MMM DD, YYYY |
2006-01-01 15:30:30 | YYYY-MM-DD hh:mm:ss |
Bool
Bools are stored as 1 or 0 within the Report Table, and booleans must be in this format when loading them into the Report Table. In other words, the Report Table will not parse string booleans on your behalf, such as "Yes," "No," "True" or "False." The Report Table uses a simple syntax for formatting.
You can use any characters in the Format field, but '[', '|', and ']' are reserved characters. Any other character is treated as a literal and is displayed as is. Thus, you may use literal characters in your format to prefix or suffix the data as you choose. If you need to use any reserved characters literally, then surround your literal text in single or double quotes. If you need to display quotes, place two of them side by side. The reserved characters are interpreted as follows (assuming a value of 1):
To Display As | Use |
---|---|
True | [True|False] |
Yes | [Yes|No] |
T | [T|F] |
The value is: True | The value is: [True|False] |
, or ] when the value is True | ", or ] when the value is" [True|False] |
Check Box (optional)
Set this value to 1 to add check boxes to the left side of each item in the column. See the ColumnCheckBox property for details. Omitting this value means no check boxes will appear in this column.
Font (optional)
You can customize the font of a column using this value. Use it to bold a column, or to show Wingding characters such as check marks or other symbols. Omitting this value defaults the columns to 8 pt. Tahoma.
Setting this value sets the font for both the header and the data within the column to the same font. If you want to set the header independently of the data, use the ColumnHeaderFont and ColumnFont properties.
Data Source (optional)
Use this value to determine how the items' values are determined. Omitting this value uses the Text option, which means the item's value is simply its text. However, you can also specify CheckBox or Both. See the ColumnDataSource property for details.
Check Box Alignment (optional)
The column's check box alignment establishes where the check box is placed within the items. See the ColumnCheckBoxAlignment property for more information. Here are the values you can use:
Value | Abbr. | Description |
---|---|---|
Left | L | Place check box to left, text to the right |
Center | C | Place check box in center, text placement is ignored |
Right | R | Place check box to right, text to the left |
Hyperlink (optional)
The Hyperlink option can be used to turn all items in the column into hyperlinks. All you have to do is set this value to 1. If you wish to enable individual items as hyperlinks, you may use the ItemHyperlink property. Once an item is enabled as a hyperlink, the OnItemHyperlink event will fire when the user clicks on the item's text.
Example
ColumnList = "" // Fix the width of column 1 ColumnList<-1> = "ID":@VM:"Number":@VM:"50":@VM:0:@VM:0 // Let the remaining columns use default values ColumnList<-1> = "First Name":@VM:"Text":@VM:"200" ColumnList<-1> = "Middle Name":@VM:"Text":@VM:"200" ColumnList<-1> = "Last Name":@VM:"Text":@VM:"200" // Now set up the columns Set_Property(@Window:".OLE_REPORTTABLE", "OLE.ColumnList", ColumnList)