Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing Procedure Within a Loop
Message
 
To
09/04/1999 11:56:15
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00206923
Message ID:
00206936
Views:
21
>I use Foxpro 2.0 for dos. I have an array that I want to loop through and print a job cost for depending on certain criteria in two of the columns of the array. I use a for loop but it always prints the first valid job cost over and over. I check for the criteria and if the row meets the criteria then I do a procedure which is the report print done in code, not a report done with the report wizard. It seems like the loop is only going until it finds the first valid row, prints, and then starts looping at the beginning again. Is there something in the print procedure that is terminating the loop? I set the printer on, set device to printer in the procedure, set printer off, and set device to screen all in the print procedure. I have tried moving the set on commands to run before the loop, and the set off ones after the loop, but this doesn't make any difference. Any ideas? Thanks
>
>Rhea Urusky


It sounds like you're resetting your incrementer. Are you doing another for loop inside of this one? I've caught myself doing this where I just throw a for i = 1 to N and then later decide to do a for loop and out of habit for i = 1 to N, which resets the value of i. Change your vars to something besides i, and also check your array to make sure you aren't referencing myarray(1,1) as opposed to myarray(i,1)
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform