Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid isn't flexible enough
Message
From
16/03/1998 11:52:23
 
 
To
16/03/1998 11:42:20
General information
Forum:
Visual FoxPro
Category:
User groups
Miscellaneous
Thread ID:
00084219
Message ID:
00084845
Views:
38
>The problem isn't in the totalling....
>
>everything works ok, except for row 1 ?
>
>I think there is a bug in the grid. I am not smart enough to program a total routine that works everywhere but the first row. It is completely standard code.
>
>here it is....
>
>TMPGEB = SELECT()
>SELECT FAK_TT
>GOTO TOP
>m_art_tot = 0
>m_btw_tot = 0
>m_tot_tot = 0
>DO WHILE .NOT. EOF()
> A_BTW = BTW
> A_PRIJS = APR
> A_AANT = AANT
> IF A_AANT = 0
> A_AANT = 1
> ENDIF
> IF A_BTW <> SPACE(5)
> SELECT ART_BTW
> SEEK(ALLTRIM(A_BTW))
> IF FOUND()
> A_PERC = PERCENTAGE * 0.01
> ELSE
> A_PERC = 0
> ENDIF
> ELSE
> A_PERC = 0
> ENDIF
> select fak_tt
> REPLACE PRI WITH (A_PRIJS * A_AANT)
> m_art_tot = m_art_tot + pri
> m_btw_tot = m_btw_tot + ((pri * a_perc))
> SKIP
>ENDDO
>thisform.text1.value = m_art_tot
>thisform.text2.value = m_btw_tot
>thisform.text3.value= m_art_tot + m_btw_tot
>thisform.text1.refresh
>thisform.text2.refresh
>thisform.text3.refresh
>thisform.refresh
>SELECT(TMPGEB)
>
>Even the thisform refresh won't help ??????? the code is not executed when a colum of row one loses the focus ?????

Just few thoughts:
1.My preference as I told you is to use total column for row presenattion. For whole all_row_total presentation I would use SELECT_SQL because IMHO it's more reliable (doesn't move pointer in record source). Maybe I would launch totaling routine from record or field rule (especially reasonable if you use cursor as recordsource). I don't want to say that my approach is the best or better than yours, but if you stick to your code that's your option.
2.I don't know about any grid bugs related to the first row.
3.IMHO, it's not efficient to cut previous messages off the thread because it prevents other UT members from participation.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform