Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Duplicates Records
Message
 
 
To
06/03/2004 13:37:24
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00883809
Message ID:
00883881
Views:
11
Here is another way to do it, that only takes a 2-record cursor. This method consumes somewhat less TMP file space than the UNION <s>. I think you'll find that the records come out in the order you want.

You can ask your users "how many labels should each record generate?" and change this on demand (doesn't have to be just 2).
number_of_labels = 2 && or whatever
CREATE CURSOR dummy (onefield l)
for ii = 1 TO number_of_labels
   INSERT INTO dummy VALUES (.T.)
endfor
INDEX ON onefield TAG onefield
* now you have the cursor with the
* required number of "dummy" records
SELECT your_real_table
SET RELATION TO .T. INTO dummy
SET SKIP TO dummy
* now you basically have doubled,
* tripled, or however many records you need,
* for each record in your real table
* for the purposes of label/reporting
>L<
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform