I have a relatively simple problem but do not know how to fix it.
I have a client that runs monthly invoices for their customers. Some are sent by snail mail and others are Emailed. This has been running well until they asked to be able to run them in batches of 100 instead of all at once. The last run was in excess of 400 invoices.
The process starts by having them enter the invoice date they want to run invoices for. I then create a query for invoices with that date that have an outstanding balance. All new invoices will have the billed amount still outstanding.
When the invoices were run all at once it was easy. I got the first record and fetched the next after it was printed until they were all printed.
Now that they want them batched by 100 I have to allow for interruption in the printing process and have to be able to restart. I added the total invoice count and the last printed batch count to the Menu table so I can see where it was if they aborted the total print. I only check this if the total invoice count is in excess of 100. The daily invoices they run will not trigger that coding because they do not have that many daily invoices.
My problem is how do I point the query table pointer to the appropriate record to resume the printing since this is a queried process??
Attached is a text portion of the coding with the original fetch_first and fetch_next still there. I will need to remove them once I get the proper coding done.
As usual thank you all for your input to my problem.
Don
I have a client that runs monthly invoices for their customers. Some are sent by snail mail and others are Emailed. This has been running well until they asked to be able to run them in batches of 100 instead of all at once. The last run was in excess of 400 invoices.
The process starts by having them enter the invoice date they want to run invoices for. I then create a query for invoices with that date that have an outstanding balance. All new invoices will have the billed amount still outstanding.
When the invoices were run all at once it was easy. I got the first record and fetched the next after it was printed until they were all printed.
Now that they want them batched by 100 I have to allow for interruption in the printing process and have to be able to restart. I added the total invoice count and the last printed batch count to the Menu table so I can see where it was if they aborted the total print. I only check this if the total invoice count is in excess of 100. The daily invoices they run will not trigger that coding because they do not have that many daily invoices.
My problem is how do I point the query table pointer to the appropriate record to resume the printing since this is a queried process??
Attached is a text portion of the coding with the original fetch_first and fetch_next still there. I will need to remove them once I get the proper coding done.
As usual thank you all for your input to my problem.
Don
Comment