Information générale
Titre:
Parent-Child Printing Problem
Hi Experts,
I use CursorAdapter subclasses in my data entry form class. Let us suppose I have just two CAs: INVOICEHEADER (Parent) and INVOICEDETAIL (Child).
For INVOICEHEADER, I pull out all the records, while for INVOICEDETAIL, I just requery for the detail records that the currenet INVOICEHEADER record is related to.
So, at any given time, whenever I change the record position of INVOICEHEADER, the data entry class will force the requery of INVOICEDETAIL. Works ok.
Now, printing out an invoice works fine - if ONE AT A TIME - since at any given time the current invoicedetail records have already been pulled. My problem lies in allowing the user to specify a range of invoice numbers to print as a batch!
Should I:
a. Just pull out ALL invoicedetail records, do a SET RELATION and SET SKIP TO Invoicedetail? (but this would not be 'sound' client-server pratice right?)
b. Go through a loop of actions for each INVOICEHEADER, like so:
- Go to first INVOICEHEADER in range
- Requery INVOICEDETAIL
- SET RELATION, SET SKIP TO InvoiceDetail
- PRINT...
- SET SKIP TO (deactivate SET SKIP)
- SKIP to next INVOICEHEADER record
- Requery INVOICEDETAIL .....
I still do not know if option B will work.
I hope there are better suggestions out there.
Thanks for any help.
Dennis
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement