Error about table with break footer (function TableBreakSubscript)

Startbeitrag von Bruce Lee am 02.09.2015 13:48

I am working on table with break.
I have two breaks. When I update the table, it will cause error info as you can see in the attachment.
When I click Debug, it will point to TableBreakSubscript function in the "Displaying a row of BRK_BreakFooter2" block code.

Here is more error information:
Error at line 2 of Displaying a row of BRK_BreakFooter2 ( TABLE_TimeCardWeekly ) process.
TableBreakSubscript function called.
Empty list.
No valid subscript for control TABLE_TimeCardWeekly.
(Specified subscript: 8).

----- Technical Information -----

Project : GrowProElite

WL call:
Process of 'Displaying a row of BRK_BreakFooter2 ( TABLE_TimeCardWeekly )' (WIN_Table_TimeClock.TABLE_TimeCardWeekly.BRK_BreakFooter2), line 2, thread 0
'TableBreakSubscript' function, syntax 0

What happened?
Empty list.
No valid subscript for control TABLE_TimeCardWeekly.
(Specified subscript: 8).

Error code: 10060
Level: fatal error (EL_FATAL)

Dump of the error of 'wd200obj.dll' module (20.0.327.5).
Identifier of detailed information (.err): 10060
Debugging information:
Fonction (1,392)
Additional Information:
EIT_PILEWL :
Displaying a row of BRK_BreakFooter2 ( TABLE_TimeCardWeekly ) (WIN_Table_TimeClock.TABLE_TimeCardWeekly.BRK_BreakFooter2), line 2
Initializing TABLE_TimeCardWeekly (WIN_Table_TimeClock.TABLE_TimeCardWeekly), line 6
Exit from COL_Out1 ( TABLE_TimeCardWeekly ) (WIN_Table_TimeClock.TABLE_TimeCardWeekly.COL_Out1), line 51
EIT_DATEHEURE : 02/09/2015 08:35:32

Help

-Check whether the list or combo is not empty.




Here is my code:
IF TableBreakSubscript(BRK_BreakFooter2) 0 THEN
nSubscriptFooter2 = TableBreakSubscript(BRK_BreakFooter2)

ELSE
Error("Unable to find subscript of BRK_BreakFooter2 " + HErrorInfo())
END


I am thinking it might be because the break footer2 hasn't been initialized when it calls TableBreakSubscript().

Any suggestions?
[attachment 1678 Errortablebreak.PNG]

Antworten:

Hi Bruce,

it looks like the table is empty yet, on the moment TableBreakSubscript() is called.
Is the function called AFTER filling the table, as noted in the help ?

von Stefan Bentvelsen - am 02.09.2015 14:45
If you're displaying a break the table should already be initialized right? And the function should return 0 if an error occurred. It sounds like the function is broken.

von Curtis - am 02.09.2015 14:53
This error only happen some times. Maybe less than 10%.
That is why it confused me so much.

I use TableAddLine() to fill the data to table. I suppose all the rows up to the "displaying break footer2" has been filled.
And I call TableBreakSubscript() in the "Displaying a row of BRK_BreakFooter2" block. I think the break footer2 should be initialized before it is ready to display.

von Bruce Lee - am 02.09.2015 15:25
Stefan,
I think you are right, I test it. When the error happened, the table is empty.
I don't know why it doesn't bring in data to the table sometimes. But right now, I call the function before I make sure there is data in the table. It looks like it is working now.
I will test it further, thank you for your help!

von Bruce Lee - am 02.09.2015 16:11
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.