Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieve top record in a grid
Message
From
30/12/2010 14:55:07
 
 
To
30/12/2010 13:22:18
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01494160
Message ID:
01494182
Views:
63
Hi Rich,

Yes I am going through 2 free tables to pass variables (external1.dbf) and the displayed records in the grid (external2.dbf)
the problem I have is to fill the grid data into (external2.dbf)
let's say there are 15 records in the grid-table but only 8 are visible. I only want to pass over those 8

as a matter of fact the first exe is a POS app and it shows the purchases. Usually there are only a few (it's for liqueur stores) so I pass them all, but in the rare case one byes many items for a big party I want to pass only the current visible record

the second exe is running on the same machine but another monitor to show the customer what is purchased along wth the total, discount tax et. and some PR stuff to make him buy more :-)

in the POS screen is a method calculating all this stuff and maintainng the cursor for the items sold
this is tha place where I want to fill the external tables

(had all this working using html and IE but that broke when switching to win7 and I could not find a real solution. So I went back to the dual exe (pure VFP) model

Thanks


Peter
>>
>>they both stay at 0
>>what are they supposed to be doing
>>
>>Peter
>
>The only way I know how to make two VFP exes "talk" to each other is by sharing information in a table. I don't doubt that there are ways to do it better, but I don't know them.
>
>With this in mind and assuming that the second exe can replicate the recordsource for the grid in the first exe.........
>
>The afterRowColumnChange method in the grid in the first exe can write its ActiveRow and Relative Row to a table the second exe can read. The second exe could do something like
>
>SELECT infotable
>lnActiveRow = nActiveRow
>lnRelativeRow = nRelativeRow
>
>SELECT (mygrid.recordsource)
>GOTO lnActiveRow - lnRelativeRow + 1
>
>myGrid.refresh
>
>It probably needs some tweaking (especially if there are filters and/or indexes on the recordsource) and is completely untested but I think that should make the two grids display the same set of records.
>
>If not (and I certainly wouldn't be surprised to find it doesn't) I hope somebody else can come with something useful for you. I'll be interested in better solutions.
>
>Good Luck...........Rich
Peter Cortiel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform