Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting in Reports
Message
From
10/07/2006 18:24:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01135090
Message ID:
01135166
Views:
15
>When printing using the new behavior in VFP 9, the set relation to works great when you have multiple bands that need to be associated with each other. What I'm having a problem with is sorting. If you set the child item relation to a code field but want the child items to print sorted by another field, how can you do this?

If your Set("Exact")=off (which it is, by default), you can index your detail cursor on the field used in relation plus the field you want for sorting, i.e. use a composite index. For example, if your child table is related to the parent table by a field called fld1, and you want it sorted by fld2, then you need an index on fld1+fld2.

Of course, this works for character indexes only - any other type needs to be converted by using transform(.., "picture here"), dtos() etc, while making sure that each of these conversions yields a string of fixed length.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform