Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reprint Posted Invoices - can't find invoice

Status
Not open for further replies.

keiram

Programmer
Jun 17, 2003
5
US
Hello,

We are running Macola v7.5.102c, usig PSQL 7.0 on a Novell 5.x server. Recently, we started having a strange problem where we cannot seem to re-print a posted invoice, even though it is there. The re-print posted invoices option tells that the invoice is "out of range", but the same invoice comes-up on the screen without any problems in
the sales history view, and I can also see it in the OEHDRHST and OELINHST files using SQL.
In addition, this problem seems to be random. The same invoice that doesn't print at one point, will then print fine at another time. We've considered that this might have something to do with record locking, but I do not see any record locks on OEHDRHST/OELINHST at the time when the problem occurs.

Can anyone offer any other ideas? We already tried rebuilding both files as well, and it did not help.

Thanks.
 
Are you using the Crystal Report for reprint posted invoices, or the cobol report for this option?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
What are your file sizes on oe history? There have been some physical limitations on size. In addition, Macola will misbehave if you have a corrupted record. This typically happens when you have header records with no line items or vice versa. MS Access is usually the way to find if this condition is true.
 
We are using the Macola option for "Reprint Posted Invoices", within the "Order Entry - Trx - Invoice/Cash" (i.e. not a Crystal Report, or any other application).

Our files are farely large, since we've been using Macola for a number of years now. The OEHDRHST.BTR is 283,449,344 and OELINHST.BTR is 180,642,816. I am pretty sure this is not a curruption problem, since I just did a low-level rebuild on both of those files. Also, the detail and the header records are there. I checked in SQLScope, and as I said the Macola option for Sales Hisotory View by Invoice number DOES bring up the header and the detail records without any problems.

Yesterday we also had a new type of behavior, where instead of just getting an error "Nothing in Range" when trying to reprint an invoice, it would actually go through the process, and something was put into the print-queue, but it would either print a blank page, or nothing at all.


 
Keiram,

Assumming you are using PWE, there are 2 options to reprint posted invoices, one is a crystal report and one is a cobol report. Both of these options are under Order Entry, Trx, Invoices/Cash. Which one are you using? If you are not using PWE, you are using the cobol report. If this is the case try the PWE crystal report and see if it works.

Also, have you tried this both by invoice and by order? I am just grasping at straws here trying to find some rhyme or reason behind this.

Are you able to print to this printer for any other reason? Is it a dedicated invoice printer? I assume your current invoices are printing no problems.

Also, are you sure of the version you are using? 7.5.102c is very old. It is so old I do not have any clients running it so I cannot even test this anywhere. In fact it is so old it may predate PWE which could explain a lot of confusion on cobol reports versus crystal reports.

I hate the standard tech support battle cry of "upgrade" but in this case it may well be worth it if it is an option.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
The version of Macola I listed, is correct, and I know it's an old one. We have not upgraded in over 2 years, at least, of not more, and have no plans to upgrade in the near future either. The reason for this, is that our company is slowly migrating to a different ERP package, and our location should be switching over later on this year. So, we have to get-by for a few more months.

To anshwer your other question, I did try to print using invoice and order number, and the results are about the same. Although, the other day, when I tried by invoice number, it printed, but nothing came out, and when I tried the same invoice by order number, I got "Nothing In Range" error.

I saw a mention in an earlier reply, about a possibility that it could have something to do with large data file sizes. Would deleting some of old invoice records from OEHDRHST/OELINHST files help? We have invoices as far back as 1998 in those files, which we probably don't need to access.
 
It is worth a shot. To delete old records, go to OE->Reports->Order History Reports->By Order Number put in a starting date of say 1/1/1990 and end ending date that you can live with, and make sure the "purge history file" checkbox is checked.

There is no "undo" when you do this, so make certain this is OK before you launch it.

Also be advised that one of the characteristics of a btrieve file is that it will not resize itself when data is purged. You will have to rebuild the file after the purge for the file to get physically smaller.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
A macola rebuild will not detect a mismatch between your header and line files. When macola encounters a record which either has no lines corresponding to the header or vice versa, it stops processing. File corruption can occur for any number of reasons, but generally is due to power outage or improper exit from the program. If you want to investigate this, use MS Access to detect the mismatch.

Is your backup still running in the morning when you come in? Backup software will try to take exclusive use of the files & it might explain the randomness of this problem. Have you checked the pervasive client configuration on your workstations to be sure no one is set to local? If a particular user is set to local, they might be locking the file from other users accessing it.
 
Well, no luck with deleting some records.
I removed about 2 years worth of invoices from OEHDRHST/OELINHST. Ran a Low-Level Btrieve rebuild, and
ALSO a Macola Rebuild to reduce the size of the file.

Still, the reprint does not work on some invoices. If I give it a range of invoice numbers, some invoices will print, and some won't. It does seem to be consistent now on specific invoice numbers, which will not print no-matter what. I also tried creating a separate company, so that I know for sure nobody else is using the files when I am trying to print. And, still no luck, the same invoice number will not print there either. So, it can't have anything to do with locks, since in the temporary company I was the only one who had the files open.

Another strange behavior that I noticed, is that if I select by invoice number first, it seems to print, but nothing comes out of the printer (or just a blank page comes out). Then, if I change to order number selection, and enter the order number corresponding to the same invoice, then I get "Nothing In Range". After that, either selection by invoice or order gets me the error message, unless I exit the Reprint option and go back in.

This is so very confusing, and we are all at a loss. We've been reprinting invoices for years, and this problem just started all of a sudden, about 2 weeks ago.

 
Try running this query from access

SELECT OEHDRHST_SQL.ord_no, OEHDRHST_SQL.inv_no, OELINHST_SQL.ord_no, OELINHST_SQL.item_no
FROM OEHDRHST_SQL LEFT OUTER JOIN
OELINHST_SQL ON OEHDRHST_SQL.ord_type = OELINHST_SQL.ord_type AND OEHDRHST_SQL.ord_no = OELINHST_SQL.ord_no
WHERE (OELINHST_SQL.ord_no IS NULL)

If you get a result set then see if the invoice you are trying to print is in that result set.

Andy

Andy Baldwin
 
The SQL statement didn't find anything, but it was worth a try....

BUT.... the good news is, that I found the problem. It was the HOLD_FLAG in OEHDRHST.BTR I guess the customer for that invoice was on Credit Hold at the time that the inoice was posted, so the Invoice itself got marked as on hold, and it would not print. Sounds like a "bug" to me... since I don't see a reason why an invoice that was already created should not be able to reprint, even if a customer is on credit hold. What's the purpose of that? I don't get it myself. Anyway, as soon as I cleard the HOLD_FLAG in OEHDRHST, I was able to print the invoice. Unfortunately, I don't see any options in Macola to clear that flag, so I guess I will have to do this manually in SQL...

Thanks for all you ideas anyways. I appreciated all the help.
 
I am not sure if this is still an issue, but if it is, it gets my vote for a bug.



Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top