Database Reference
In-Depth Information
and set the ScriptLanguage property to Microsoft Visual Basic 2012 .
Set the ReadOnlyVariables property to reference the following:
$Package::AmountSum
$Package::Delimiter
$Package::LastUpdateDateTime
$Package::RecordCount
On the Inputs and Outputs page, ensure the SynchronousInputID property of
Output 0 is set to None and add an output column named HeaderRow (String data
type, 500 length) to Output 0. Click the Script page and the Edit Script button. Replace
the code in the CreateNewOutputRows() subroutine with that from Listing 7-10 .
Listing 7-10 . Code for the CreateNewOutputRows Subroutine
Public Overrides Sub CreateNewOutputRows()
' create header row...
' Get variable
values...
Dim iRecordCount As Integer
= Me.Variables.RecordCount
Dim sDelimiter As String = Me.Variables.Delimiter
Dim dAmountSum As Decimal
= Convert.ToDecimal(Me.Variables.AmountSum)
Dim dtLastUpdateDateTime As DateTime = _
Convert.ToDateTime(Me.Variables.LastUpdateDateTime)
Dim sHeaderRow As String = iRecordCount.ToString
& sDelimiter & _
dAmountSum.ToString &
sDelimiter & _
dtLastUpdateDateTime.ToString
With Output0Buffer
.AddRow()
.HeaderRow = sHeaderRow
 
 
Search WWH ::




Custom Search