Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid ordering
Message
 
 
To
06/12/2004 11:09:50
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00967218
Message ID:
00967227
Views:
4
>I have a grid that displays data from the parts table. However, one of the grid columns uses the following expression as its control source.
>
>iif(seek(parts.customersid,'customers','custid'),customers.name,'')
>
>The expression looks up the customer name in the customers table and displays it in the grid along with the other parts table fields.
>
>How can I order the grid data by customer name?

I would create a cursor that denormalizes the data, and use that for the record source of the grid --
select parts.*, nvl(customers.name, padr('...n/a...', ' ' 40)) as custname ;
   from parts left join customers ;
     on parts.customersid = customers.custid ;
   where...
Then you can index the cursor and display however you want. Pad the CustName with however many spaces needed to match the width of your customers.name field.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform