chapeau_melon Posted June 28, 2007 Posted June 28, 2007 (edited) Can you help me with the following export problem: Customer table related to invoice table When I select 1 customer the relating result can be >1 invoices. OK My Dbase is set up to show the last invoice inputted as first in a preview mode. Printing these invoices is easy ; I mean whatever invoice I select, It will print the selected invoice because I stated “print current record”. The problem is I’dd like to export the invoice as tab separated file. Suppose there are 3 invoices for one customer, It will always export the first(oldest) one. Even if I select another one. I can’t find the solution as in printing export only current record ? Can you help me ? Kind regards Edited June 28, 2007 by Guest
Vaughan Posted June 28, 2007 Posted June 28, 2007 The Export command always works on the found set of records. To export only the current record, make sure it's the only record in the found set.
chapeau_melon Posted June 28, 2007 Author Posted June 28, 2007 That's what I was afraid off. But how to limit the number again ? 1 customer gives initially 3 invoices. If I select randomly one of that 3, how to limit that found set to that one selected ?
LaRetta Posted June 28, 2007 Posted June 28, 2007 Loop Show All Records Omit Record Show Omitted Only Exit Loop If [ Get(FoundCount) = 1 ] End Loop ... perform your export The loop prevents the possibility of another User creating a new record which would be included in your 'Show Omitted Only' step. The Show All Records must be within the loop. LaRetta
LaRetta Posted June 28, 2007 Posted June 28, 2007 I should mention that you will lose your found set. If this is a problem, then open another window to perform the script and export. Then close your window. Your found set will be preserved in the prior window.
chapeau_melon Posted June 28, 2007 Author Posted June 28, 2007 Seems nice, but I can't get it to work. on Layout 1 I choose the costumer. on Layout 2 It gives me the related invoices. How do I do in for the new window? I tried but I get in an infinate loop ? I can not add show all records, cause this will break my original found set based on the costumer. Layout 2 gives me for example found 3 out of 10 records. Your script should only work on those 3. New window[] Omit Record Show Omitted Only Exit Loop If [ Get(FoundCount) = 1 ] End Loop
chapeau_melon Posted June 28, 2007 Author Posted June 28, 2007 I complained to early I do have to include show all records. It works very nicely. Thanks a lot
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now