tags:

views:

9

answers:

1

I would like to add a "Print-Ticket" command to the ring menu in my I4GL Form so that when my users hit the escape key to update a transaction row they can select the "Print-Ticket" command from the ring menu to print the current row being displayed with an ace report, without exiting the form. I would also like this print capability for any queried transaction row whether it has been updated or not. Can this be done with I4GL forms?

+1  A: 

Yes

The action block for 'COMMAND "Print-Ticket"' can invoke a function which drives an I4GL report (or, indeed, it can execute an ACE report via the RUN statement). In theory, you could write the body of the function that drives the report in the action block, but that would be a diabolical way of abusing the language; it is much better to use a function. If you give the function an argument identifying the ticket to be printed, it just needs to be invoked with the correct ticket number - it does not matter whether to the I4GL function whether it has been updated or not.

Jonathan Leffler
Fine.. I also want to prevent the user from adding a new row or updating an existing one unless user has manually issued the 'Print-Ticket' command to print the ticket corresponding to the last added or updated row.. Can this be done with 4GL?
Frank Computer
Of course; you keep track of whether the ticket has been printed (in a program variable), and decline to add or update unless the printout has occurred. You could even programmatically trigger the printout when the user hits update or add.
Jonathan Leffler
@Jonathan: well I would rather leave the printing in a manual mode for several reasons, users get careless with dot-matrix printers, etc.. i'm also contemplating allowing users to update a batch of a particular customers transactions (example: customer makes interest pymts on multiple pawned items) then printing all the new tickets. Everytime a customer makes a new pawn, increases loan amt on existing pawn or makes an interest payment, a new ticket is printed with a serially incremeted ticket number.
Frank Computer