How do I use the ReportColumnType and ReportColumnPreferenceType values when I build custom Office Accounting reports?
The question about the ReportColumnType came up in a comment for a prior post, and yeah I guess it’s fair that I tell you about it :o)
First a brief description of the values, from the quick overview you can see that you really do not have that many ColumnTypes to choose from as many of the values are really for internal use only…
ReportColumnType values:
|
Value |
Description |
|
CurrencySymbolColumn |
If your report supports multi currency you can use this column type for one column containing the currency symbol (like $ or £) to be used for the foreign currency columns. (See description of ReportColumnPreferenceType for how you can use this Column Type) |
|
CustomizableColumn |
This is meant as the ColumnType for customizable columns / User defined columns. The functionality behind this ColumnType is not yet implemented in the infrastructure. |
|
Data |
This is the column type used for a normal column shown in a report. Most of your columns should have this type. |
|
GroupID |
Internal use only, you should not use this value. |
|
GroupSorting |
Internal use only, you should not use this value. |
|
NotVisible |
Columns of this type will never be visible in a report. You can use this type for columns you use internally for example if you want to group your report by customer you may want a column containing the CustomerID that you can use for grouping. |
|
Option |
This is often used as the column type for the column containing the ID of something you want to drill down to. If your report is showing invoices, you could mark the DocumentID column as a Option column. |
|
ParentColumn |
Internal use only, you should not use this value. |
|
RowID |
Internal use only, you should not use this value. |
|
RowLabel |
This is the first column in the report. If the user scrolls horizontally in the report this column will stay visible. You should only mark one column with this type in your report. |
|
SubColumn |
Internal use only, you should not use this value. |
So really you should focus on four Column types: RowLabel, Data, CurrencySymbolColumn and NotVisible.
To give the full story about the CurrencySymbolColumn value I need to describe another enumeration in a bit more detail:
ReportColumnPreferenceType values:
|
Value |
Description |
|
AccountCurrency |
If your report supports multi currency and you have a column containing the currency code (like USD) you can give the column this PreferenceType and it will only be visible when the user turns on “Use Multi currencies” |
|
AccountCurrencyAmount |
If your report has a foreign currency amount (we call it account currency as in the currency of the account) you can mark the column with this preference type. The result is that the column will only be visible when the user turns on “Use Multi currencies” AND the currency symbol on this column will be taken from the column marked with ReportColumnType.CurrencySymbolColumn |
|
CompanyCurrencyAmount |
Any company currency amount in your report can be marked with this preference type, the result is that the symbol from your company currency will be used for the column when the user turns on “Use Multi currencies”. |
|
AccountId |
Setting any of these values on a column basically means that the column should only be visible if the Company preference related to that value is turned on by the user.
For example: If I have a column containing the display number from a financial account I could set the PreferenceType on this column to AccountId, and the column would only be visible if the user has selected “Use account numbers” in the Company Preferences. |
|
Class |
|
CustomerId |
|
EmployeeId |
|
ItemId |
|
Job |
|
JobId |
|
VendorId |
|
None |
Default value. |
Hope this little overview helps a bit…