Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FOR part not working
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01496452
Message ID:
01496469
Views:
41
>I do not understand why it is that a perfectly functioning set of code is now reporting on only the top record in spite of passing over the correct Order # to the REPORT FORM command, as follows:
>
>
>* PrintButton.Click()
>lnOrderNumber = Orders.Order_No
>REPORT FORM Order PREVIEW FOR Orders.Order_No = lnOrderNumber
>
>
>It seems that the REPORT FORM goes for the TOP record each time, and not the record pointed to by the FOR clause of the command.


I do not have an answer as to why it does not work, but I think it would be faster something like this (if you have a tag for the order number in the table)
set order to order_no
seek Orders.Order_no
report form order preview while order_no = Orders.order_no
other alternative would be a select statement (or view as Craig suggested) but that might need changes in the report, if you were using aliases.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform