Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing sort sequence of report at run-time
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01101024
Message ID:
01101358
Views:
9
>Hi Cathy
>The specific problem I'm trying to avoid is having to create another report when all you really want is the same list in a different sequence. I'd like a combobox on the Report shell to contain up to 3 indexes for a specific report. When the user selects one of the indexes, change the DE.Cursor1.Order property so that the report prints or previews in that sequence.
>Bill

You can put code in the OpenTables method of the data environment to switch the order. Try this code...
NODEFAULT
DODEFAULT()

This.cursor1.Order = SomeVariableThatSetsTheOrder
GOTO TOP
FYI .. the reason you need NODEFAULT and then DODEFAULT is this method automatically opens the tables after processing any custom code. Therefore, you need to tell it "Don't open the tables when you usually do" (NODEFAULT) and then tell it "Open the table now" (DODEFAULT).

Once the tables are opened you can manipulate the order.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform