Alpha Video Training
Results 1 to 4 of 4

Thread: Query record positioning problem

  1. #1
    Member
    Real Name
    don walters
    Join Date
    Mar 2002
    Location
    North Carolina
    Posts
    113

    Default Query record positioning problem

    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
    Attached Files Attached Files

  2. #2
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,662

    Default Re: Query record positioning problem

    I doubt I have much to offer except for a few questions: What is their need for a batch of only 100? Is it so they don't run out of paper? Because you mentioned they want to be able to interrupt the printing process. Why not have your function run the batch set to no more than 100, then end it and let them run it again for the next batch?
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  3. #3
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,381

    Default Re: Query record positioning problem

    For what it's worth, I would add a field to indicate the invoice printed.
    add .and. invoiceprinted to your current query, and put in a counter to
    force it to stop printing invoices when the counter reaches 100.

    If they stop the run before it reaches 100, the query will still catch all
    the unprinted invoices.

  4. #4
    Member
    Real Name
    don walters
    Join Date
    Mar 2002
    Location
    North Carolina
    Posts
    113

    Default Re: Query record positioning problem

    The paper is one problem but as they are printing they fold and put them in envelopes if they are postal and file the copies in the customer folders( yes they keep folders!!!) so the pause gives them time to do this work. The postal prints 2 copies and the Email one to file(even tho I keep a copy as a PDF) and if the Email fails I print a report showing that. It was not a real big problem until the count got over 200.

Similar Threads

  1. Basic grid record positioning question
    By WindForce in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 04-01-2014, 01:59 AM
  2. No Record in query V10.5
    By turbojack in forum Alpha Five Version 10 - Desktop Applications
    Replies: 6
    Last Post: 03-25-2011, 12:06 PM
  3. Record Query
    By B Mac in forum Alpha Five Version 5
    Replies: 4
    Last Post: 03-09-2004, 11:57 AM
  4. Print Current Record Problem with Child Record
    By debwelch in forum Alpha Five Version 5
    Replies: 26
    Last Post: 09-27-2003, 07:11 AM
  5. Positioning With Record Number
    By Red Abicht in forum Alpha Five Version 4
    Replies: 2
    Last Post: 04-15-2002, 03:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •