Back to Index |

Job Component
GetJobStatistics method

GetJobStatistics()
Returns: CRJobStatisticsCollection (which contains a collection of CRJobStatistics objects)

The GetJobStatistics method reads the job statistics file into a collection of CRJobStatistics objects which you can use to display on the screen to your users. The job statistics contains the same exact information that you would see in the View Monitor function of the Job control window.

Example:

[Visual Basic .NET]

Dim StatsColl As ExportBudget.CRJobStatisticsCollection
Dim StatsObj As ExportBudget.CRJobStatistics
Dim nl As String = Chr(13) + Chr(10)
StatsColl = myExportBudgetJob.GetJobStatistics()
If Not (StatsColl Is Nothing) Then
' Output the statistics to a textbox...
For Each StatsObj In StatsColl
TextBox1.Text = TextBox1.Text + StatsObj.JobObj + Chr(9) + StatsObj.JobObjRecordCount + nl
Next
End If

[C#]

ExportBudget.CRJobStatisticsCollection StatsColl;
StatsColl = myExportBudgetJob.GetJobStatistics();
if (StatsColl != null)
{
// Output the Statistics to a textbox...
foreach(ExportBudget.CRJobStatistics StatsObj in StatsColl)
{
textBox1.Text += StatsObj.JobObj + (char)9 + StatsObj.JobObjRecordCount + Environment.NewLine;
}
}

© 2003 - 2007 Relational Solutions, Inc. - All rights reserved