Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN and DO WHILE logic
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01357888
Message ID:
01358043
Views:
21
>I think your logic is wrong. If you skip within the Do While, before the Replace, the first record with the *next* GroupHeading will be blanked. Try this.
>
>
>LOCAL m.FirstTime, m.CurrentGroupHeading
>m.FirstTime = .T.
>
>SELECT WorkListXMLCursor
>SET ORDER TO TAG GroupHeading    && or whatever it's called
>m.CurrentGroupHeading = GroupHeading
>
>SCAN
>    *  Never replace the first record
>    IF m.FirstTime
>       m.FirstTime = .F.
>       LOOP
>    ENDIF
>    IF GroupHeading = m.CurrentGroupHeading
>        REPLACE GroupHeading WITH ''
>    ELSE
>        m.CurrentGroupHeading = GroupHeading
>    ENDIF
>ENDSCAN
>
>
>Untested....

I'm wondering why you all keep suggesting untested ideas while this thread has a simple solution already?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform