I am using an expression to create a dynamic header row in the flat file. I am able to create dynamic date and time whenever the file is created and i am struggling to get the record count (total number of records loaded into flat file). I am getting the header as below: zero shows number of records which infact is not a right number. i am using the expression in the flat file connection manager and in the property i am using header row delimiters.
^ (Carrot) is the column delimiter
20120111^140232^0
My expression is :
DT_STR,4,1252)DATEPART( "yyyy" , @[System::StartTime] ) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , @[System::StartTime] ), 2) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , @[System::StartTime] ), 2) + "^"+
RIGHT("0" + (DT_STR,4,1252)DATEPART( "hh" , @[System::StartTime] ), 2) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "mi" , @[System::StartTime] ), 2) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "ss" , @[System::StartTime] ), 2)+"^"+(DT_WSTR, 1)@[User::Case_RecordCount]+"\r"
Please let me know how to get a value of record count in header.
Thanks