@ Mahares,
If I change the code as suggested by you the turnover figures are the same but now the scheduled on hand figures are not the same anymore. At least in the database I have. Further more I can mention that the totals exactly fit to the .NET software I wrote and checked with Excel. I am therefore sure that the totals are correct.
@ Erel.
I changed in the creating database sub real into double and float into double.
Same problem. I think is has to do with the flexible table.
Where I get the header totals directly from the database via a query with correct figures; in the flexible class module show mostly incorrect. I saw that the values of the rows are stored as strings. Can that be the reason?
So this works
The the SetHeader Sub of the Flexible Table Class:
If RightAlignment = True Then
L.Text = Values(Col) & CRLF & "∑" & NumberFormat2(Curs.GetDouble2(ColumnWithTotals),1,2,2,True)
L.Gravity = Gravity.RIGHT
ColumnWithTotals = ColumnWithTotals + 1
Else
This shows mostly wrong figures (or should I say inaccurate figures)
The Showrow Sub of the Flexible Table Class
If RightAlignment = True Then
Dim ValueDouble As Double = Values(I)
lbls(I).Text = NumberFormat2(ValueDouble,1,2,2,True)
lbls(I).Gravity = Gravity.RIGHT
Else
lbls(I).Text = values(I)
lbls(I).Gravity = Gravity.LEFT
End If
I recognized that the sub btn_creatdb_click was empty in the example. This has been changed.
After creation of the database a messagebox shows the correct values as they should appear in the flexible table (but unfortunately they still don't)
Best regards
Henk