Boris,
I have the following in my RDS reports which will dump the contets after I load it, before it's reported... WARNING, it's not pretty or elegant code....
Code:
Procedure LoadRDSData String sReportId Integer iLevel
Variant[][] vData
Integer iElements iElement iSubReports iSubReport
Integer i j iDim1Size iDim2Size
Integer iCount iChOut
tVRWTableName[] ReportTableNames
String sSubReportId sFilename
Get RDSTableNames sReportId to ReportTableNames
Move (SizeOfArray (ReportTableNames)) to iElements
If (iElements > 0) Begin
Decrement iElements
For iElement from 0 to iElements
Get AddRDSData ReportTableNames[iElement].sTableName iLevel to vData
// Right here is where we want to dump the data
// retrieve size of outer (leftmost) dimension
Move (SizeOfArray(vData)) to iDim1Size
// retrieve size of inner (2nd) dimension
If (iDim1Size > 0) Begin
Move (SizeOfArray(vData[0])) to iDim2Size
End
//Send Info_Box ("Array is" * (String(iDim1Size)) * "by" * (String(iDim2Size))) "Size"
// dump the array's contents
Move "C:\Arraydump2.txt" to sFilename
// obtain an available channel for output
Move (Seq_New_Channel()) to iChOut
// no channel available
If (not(iChOut=DF_SEQ_CHANNEL_NOT_AVAILABLE)) Begin
// Create a text file. Replaces the file if it already exists.
Direct_Output channel iChOut sFileName
For i from 0 to (iDim1Size-1)
For j from 0 to (iDim2Size-1)
Write channel iChOut vData[i][j]
Write channel iChOut ", "
Loop
Writeln channel iChOut ""
//Showln // go to next line for next row
Loop
// close output channel
Close_Output channel iChOut
// release channel for reuse
Send Seq_Release_Channel iChOut
End
Else Begin
Send Info_Box "No Channel Available for Output - File not created" "Error"
End
Send TableData sReportId ReportTableNames[iElement].iTable vData
Loop
End
Get SubReportCount sReportId to iSubReports
If (iSubReports > 0) Begin
Decrement iSubReports
For iSubReport from 0 to iSubReports
Get SubReportId sReportId iSubReport to sSubReportId
Send LoadRDSData sSubReportId (iLevel + 1)
Loop
End
End_Procedure