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