Jalz Posted April 19, 2007 Posted April 19, 2007 Hi Guys, Ive created a POS application, which uses one file, but two table occurances, parent and child. I print out from the child records, using the the GTRR nd print option. My users are printing out receipts with about 8 lines per transaction every 3 minutes or so. Occasianally the GTRR + print fails (usually midday) and tries to print out all records in the database even though I have 'only match related records'. Has anyone come accross this problem. What is the best way to print transaction lines quickly? Many thansk for your replies.
Jalz Posted April 19, 2007 Author Posted April 19, 2007 (edited) Hi Ender, Ive attached a jpg of it, as it is fairly long to type in here. The first part just makes sure the transaction type is filled in. After the printing is performed I want to generate a new record so that the clerks just scan in the items for the next customer. Edited April 19, 2007 by Guest
Ender Posted April 19, 2007 Posted April 19, 2007 What is the field definition for 'Transaction Line Count'? Also, can you post the script code for 'Print Epson Till Printer'?
Jalz Posted April 20, 2007 Author Posted April 20, 2007 Hi hope someone can help me as this is driving me insane, hope I don’t have a printing problem fifth day in a row. This is what the Print Epson Till Printer script has inside it Go to Layout["print receipt"(Transactions)] Print Setup[restore,no dialog] Print[restore, no dialog] I shouldn't need the first step, but on the first day the clerks managed to print out a different layout (the menu instead of the print receipt layout (again making me think the GTRR is failing during busy periods), so I've added this additional step in as a precaution) The Transaction Line count field is a number calculation which contains Count(Transactions::ProductID) I added this as I didn’t want to print out receipts without any lines. The printer I am printing to are epson till printers, which are lightening quick in this environment.
Genx Posted April 20, 2007 Posted April 20, 2007 What i suggest you do is temporarily put an error trap in after your GTRR... I really don't think that it's going to fail from 8 print jobs (or is it one) every 3 minutes... Just do this anyway: If[ Get(LastError) <> 0 ] Show Custom Dialog[Error ; Get(LastError)] End If Then have your users report back to you if they get some sort of error... which they will if the GTRR fails for some reason.
Ender Posted April 20, 2007 Posted April 20, 2007 Yeah, I don't see why it should fail since the related records should exist for that If[] to be true. But testing for an error should allow you to exit gracefully, maybe show an error, return the original layout, and halt the script.
Genx Posted April 20, 2007 Posted April 20, 2007 Hi Jalz, What's the relationship between Batch Transactions and Transactions (is it just ID=ID or something more complex) and why don't you just use Count(Transactions::ID) in the script directly instead of the field Batch Transactions::Transaction Line Count? With Ender's suggestion just add a halt script after the show dialog step above -- if the GTRR fails, you should be on the same layout anyway.
Jalz Posted April 21, 2007 Author Posted April 21, 2007 Hi Genx and Ender thankyou for your suggestions.Like you ender, didn't think GTRR would be a problem as I've programmed quite a few apps using this method to get related recs. We've closed up shop for the weekend, so I can make the necessary adjustments before Monday. The relationship is a bog standard id=id. I dont know why I shouldn't use Count(Transaction::ID) directly in my script rather than create a seperate field for it. I'll embed the error trap code you've passed to me Genx, and see what happens on Monday - hopefully it'll be a busy trading day.It seems to happen (from what my users are saying) when they have a queue of students(30+ on each till) who want to buy 2/3 items during break, so they really give the app a thrashing during this time and two out of the five days its failed.
Recommended Posts
This topic is 6427 days old. Please don't post here. Open a new topic instead.
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