RadarSoft.RadarCube.Web.MSAS Send comments on this topic.
AddCalculatedColumn(DataTable,String,Type,String,String) Method
See Also 
RadarSoft.RadarCube.Web Namespace > TOLAPCube Class > AddCalculatedColumn Method : AddCalculatedColumn(DataTable,String,Type,String,String) Method




OriginalTable
Defines the table to put the new field into.
ColumnName
Defines the name of the new field.
ColumnType
Defines the type of the new column.
SourceColumnName
If it is defined, the method creates an auto-calculated field that computes its value from another field and doesn’t require OnCalculateField event. Otherwise it creates event-calculated field which requires OnCalculateField event handler to be cumputed.
SourceColumnFormat
If defined, specifies the format mask to apply to the source column to get the resulting value for the calculated column.
Adds a new calculated column to a specified table.

Syntax

Visual Basic (Declaration) 
Public Overloads Function AddCalculatedColumn( _
   ByVal OriginalTable As DataTable, _
   ByVal ColumnName As String, _
   ByVal ColumnType As Type, _
   ByVal SourceColumnName As String, _
   ByVal SourceColumnFormat As String _
) As TDataColumn
Visual Basic (Usage)Copy Code
Dim instance As TOLAPCube
Dim OriginalTable As DataTable
Dim ColumnName As String
Dim ColumnType As Type
Dim SourceColumnName As String
Dim SourceColumnFormat As String
Dim value As TDataColumn
 
value = instance.AddCalculatedColumn(OriginalTable, ColumnName, ColumnType, SourceColumnName, SourceColumnFormat)
C# 
public TDataColumn AddCalculatedColumn( 
   DataTable OriginalTable,
   string ColumnName,
   Type ColumnType,
   string SourceColumnName,
   string SourceColumnFormat
)
Managed Extensions for C++ 
public: TDataColumn* AddCalculatedColumn( 
   DataTable* OriginalTable,
   string* ColumnName,
   Type* ColumnType,
   string* SourceColumnName,
   string* SourceColumnFormat
) 
C++/CLI 
public:
TDataColumn^ AddCalculatedColumn( 
   DataTable^ OriginalTable,
   String^ ColumnName,
   Type^ ColumnType,
   String^ SourceColumnName,
   String^ SourceColumnFormat
) 

Parameters

OriginalTable
Defines the table to put the new field into.
ColumnName
Defines the name of the new field.
ColumnType
Defines the type of the new column.
SourceColumnName
If it is defined, the method creates an auto-calculated field that computes its value from another field and doesn’t require OnCalculateField event. Otherwise it creates event-calculated field which requires OnCalculateField event handler to be cumputed.
SourceColumnFormat
If defined, specifies the format mask to apply to the source column to get the resulting value for the calculated column.

Return Value

Returns either a matching column from the specified table or, if there's no match, creates and returns a new one.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2010 Radar-Soft, L.L.C. All Rights Reserved.