Using CRXI reporting from SAP.
I sumittted a post previoulsy which I got some answers for, unfortunatley I had to leave it and work on other things.
Now I have time to look at the issue again. To this end can you look at the following problem please and advise if possible.
The following code collects comments in a supreport , this works fine if I place the Subreport in a Group footer in the main report.
However I need to place the subreport in the Report Footer on the main report.
When I do this I can only see the last record in the subreport.
Is there anything I can do to correct this and show all comments in the report footer.
MY CODE IN SUBREPORT
Header
Global StrKpi() as String
Global strTDline() as string
ReDim StrKpi(1)
ReDim strTDline(1)
Formula =" "
Detail section
Global strKpi() as String
Global strTDline() as string
Dim x as Number
Dim blnFound as Boolean
x = 1
blnFound = False
If strKpi(1) = "" Then
strKpi(1) = {Z_FS_Read_Text.I_ZNAME}
strTDline(1) = {Z_FS_Read_Text.T_ZLINES.TDLINE}
Else
For x = 1 to UBound(strKpi)
'If we find the kpi in our array, add the
'current tdline text for that kpi
If strKpi(x) = {Z_FS_Read_Text.I_ZNAME} Then
strTDline(x) = strTDline(x) + {Z_FS_Read_Text.T_ZLINES.TDLINE}
blnFound = True
Exit For
End If
Next x
If blnFound = False Then
ReDim Preserve strKpi(UBound(strKpi) + 1)
ReDim Preserve strTDline(UBound(strTDline) + 1)
strKpi(UBound(strKpi)) = {Z_FS_Read_Text.I_ZNAME}
strTDline(UBound(strTDline)) = {Z_FS_Read_Text.T_ZLINES.TDLINE}
End If
End If
Formula = strTDline(x)
Footer
WhilePrintingRecords
Global strTdline() as string
Global StrKpi() as String
Dim strTemp as String
Dim x as Number
For x = 1 to UBound(strKpi)
strTemp = strTemp + totext(strKpi(x)) & " " + ToText(StrTdline(x)) + chr(13)
Next x
Formula = strTemp
I should add, The comments are derived from SAP using a RFC(Remote Funtion Call)
so it's not a Table as such. So I need to keep my code in the subreport. Is it possible to loop through the comments after the report runs and copy them into the report footer in the main report using more array's.?
Thanks in Advance.
PATOR
I sumittted a post previoulsy which I got some answers for, unfortunatley I had to leave it and work on other things.
Now I have time to look at the issue again. To this end can you look at the following problem please and advise if possible.
The following code collects comments in a supreport , this works fine if I place the Subreport in a Group footer in the main report.
However I need to place the subreport in the Report Footer on the main report.
When I do this I can only see the last record in the subreport.
Is there anything I can do to correct this and show all comments in the report footer.
MY CODE IN SUBREPORT
Header
Global StrKpi() as String
Global strTDline() as string
ReDim StrKpi(1)
ReDim strTDline(1)
Formula =" "
Detail section
Global strKpi() as String
Global strTDline() as string
Dim x as Number
Dim blnFound as Boolean
x = 1
blnFound = False
If strKpi(1) = "" Then
strKpi(1) = {Z_FS_Read_Text.I_ZNAME}
strTDline(1) = {Z_FS_Read_Text.T_ZLINES.TDLINE}
Else
For x = 1 to UBound(strKpi)
'If we find the kpi in our array, add the
'current tdline text for that kpi
If strKpi(x) = {Z_FS_Read_Text.I_ZNAME} Then
strTDline(x) = strTDline(x) + {Z_FS_Read_Text.T_ZLINES.TDLINE}
blnFound = True
Exit For
End If
Next x
If blnFound = False Then
ReDim Preserve strKpi(UBound(strKpi) + 1)
ReDim Preserve strTDline(UBound(strTDline) + 1)
strKpi(UBound(strKpi)) = {Z_FS_Read_Text.I_ZNAME}
strTDline(UBound(strTDline)) = {Z_FS_Read_Text.T_ZLINES.TDLINE}
End If
End If
Formula = strTDline(x)
Footer
WhilePrintingRecords
Global strTdline() as string
Global StrKpi() as String
Dim strTemp as String
Dim x as Number
For x = 1 to UBound(strKpi)
strTemp = strTemp + totext(strKpi(x)) & " " + ToText(StrTdline(x)) + chr(13)
Next x
Formula = strTemp
I should add, The comments are derived from SAP using a RFC(Remote Funtion Call)
so it's not a Table as such. So I need to keep my code in the subreport. Is it possible to loop through the comments after the report runs and copy them into the report footer in the main report using more array's.?
Thanks in Advance.
PATOR