SQLExpressionFieldDefinitions Class
Contains the SQLExpressionFieldDefinition objects for every SQL expression field in the report.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Class SQLExpressionFieldDefinitions
Inherits FieldDefinitions
Implements IDisposable, ICollection, IEnumerable, IEnumerator
public class SQLExpressionFieldDefinitions : FieldDefinitions, IDisposable, ICollection, IEnumerable, IEnumerator
Remarks
Retrieve the SQLExpressionFieldDefinitions collection through the SQLExpressionFields Property of the DataDefinition Object.
Example
This example gets the SQL expression field definition by partial name.
'Declaration
Private Function GetSQLExpressionFieldDefinitionByPartialName(ByVal myReportDocument As ReportDocument, ByVal partialFieldName As String) As SQLExpressionFieldDefinition
GetSQLExpressionFieldDefinitionByPartialName = Nothing
Dim mySQLExpressionFieldDefinitions As SQLExpressionFieldDefinitions = myReportDocument.DataDefinition.SQLExpressionFields
Dim i As Integer
For i = 0 To mySQLExpressionFieldDefinitions.Count
Dim mySQLExpressionFieldDefinition As SQLExpressionFieldDefinition
mySQLExpressionFieldDefinition = mySQLExpressionFieldDefinitions.Item(i)
If InStr(mySQLExpressionFieldDefinition.Name, partialFieldName) > 0 Then
GetSQLExpressionFieldDefinitionByPartialName = mySQLExpressionFieldDefinition
Exit Function
End If
Next
End Function
private SQLExpressionFieldDefinition GetSQLExpressionFieldDefinitionByPartialName(ReportDocument reportDocument, String partialFieldName)
{
SQLExpressionFieldDefinitions sqlExpressionFieldDefinitions = reportDocument.DataDefinition.SQLExpressionFields;
for (int i=0; i< sqlExpressionFieldDefinitions.Count; i++)
{
SQLExpressionFieldDefinition sqlExpressionFieldDefinition = sqlExpressionFieldDefinitions[i];
if (sqlExpressionFieldDefinition.Name.IndexOf(partialFieldName) >= 0)
{
return sqlExpressionFieldDefinition;
}
}
return null;
}
Inheritance Hierarchy
Object
EngineObjectBase
SCRCollection
FieldDefinitions
SQLExpressionFieldDefinitions
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
SQLExpressionFieldDefinitions Members
CrystalDecisions.CrystalReports.Engine Namespace