ReportWriter 7.0.1, Dataflex 19.1, Windows 10:
Report with 5 subreports shows this error when changing something in
Function AddRDSData String sTableName Integer iSibling Integer iLevel Returns Variant[][]
see my example behind:
If I change
If ((zStaende[iRow][6] >= 16) and (zStaende[iRow][6] <= 40)) Begin
to
If (zStaende[iRow][5] = "WW") Begin
then this error occurs. I think the only difference between these two statements is that with "WW" there are found more data.
---------------------------
Unhandled Exception in Debugged Application
---------------------------
UNKNOWN(0xc0000374) at address 0x7781FBE3 occurred in the program being debugged.
The debugger will enter limited break mode so that you can inspect the problem.
Use the callstack and other debugger windows to find out the cause of the problem in your program.
---------------------------
Code:
Procedure ComReportRefresh String llsId
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 1
Send DefineParam to hDispatchDriver OLE_VT_BSTR llsId
the cursor stands on this next line:
Send InvokeComMethod to hDispatchDriver 5 OLE_VT_VOID
End_Procedure
Code:
Function AddRDSData String sTableName Integer iSibling Integer iLevel Returns Variant[][]
Variant[][] vData
Integer iRow iAnzOrder iBishOrder j iObj k iAnzTage x ii //test
Number SumPos nMin nMax nZW nSumposWasser2 nAnteilWasser2 nQm
Boolean bWasser2
Number[] tMinMax
Variant[][] vDataHZ
Variant[][] vDataHZ1
Variant[][] zStaende
Variant[][] vWasser
Variant[][] vHeizung
Case Begin
Case (iLevel = 1 and sTableName = "ZaehlerStaende")
Get pvZStaende to zStaende
Move 0 to j
Move (SizeOfArray(zStaende)) to ii
For iRow from 0 to (ii-1)
If ((zStaende[iRow][5]) ="KW") Begin //<= 15)
Move zStaende[iRow][0] to vData[j][0]
Move zStaende[iRow][1] to vData[j][1]
Move zStaende[iRow][2] to vData[j][2]
Move zStaende[iRow][3] to vData[j][3]
Move zStaende[iRow][4] to vData[j][4]
Move zStaende[iRow][5] to vData[j][5]
Move zStaende[iRow][6] to vData[j][6]
//5.Showln
If (checked_state(oCheckWerteAusgabe)=True);
Showln vData[j][0] Tab vData[j][1] Tab vData[j][2] Tab vData[j][3] Tab vData[j][4] Tab vData[j][5] Tab vData[j][6]
//Showln zStaende[iRow][0] Tab zStaende[iRow][1] Tab zStaende[iRow][2] Tab zStaende[iRow][3] Tab zStaende[iRow][4] Tab zStaende[iRow][5] Tab zStaende[iRow][6]
Increment j
End
Loop
Set pvZStaende to zStaende
Case Break
Case (iLevel = 1 and sTableName = "ZaehlerStaende1")
//Get pvZStaende to vData
//Move zStaende to vData
Get pvZStaende to zStaende
Move (SizeOfArray(zStaende)) to ii
Move 0 to j
for iRow from 0 to (ii-1)
//If ((zStaende[iRow][6] >= 16) and (zStaende[iRow][6] <= 40)) Begin
//Bisher c<= 32)
If (zStaende[iRow][5] = "WW") Begin
Move zStaende[iRow][0] to vData[j][0]
Move zStaende[iRow][1] to vData[j][1]
Move zStaende[iRow][2] to vData[j][2]
Move zStaende[iRow][3] to vData[j][3]
Move zStaende[iRow][4] to vData[j][4]
Move zStaende[iRow][5] to vData[j][5]
Move zStaende[iRow][6] to vData[j][6]
If (checked_state(oCheckWerteAusgabe)=True);
Showln vData[j][0] Tab vData[j][1] Tab vData[j][2] Tab vData[j][3] Tab vData[j][4] Tab vData[j][6]
Increment j
End
// //5.Showln
Loop
Case Break
Case End
Function_Return vData
End_Function