Bug: Last tested with Master Builder version 184.108.40.206
Here is one to file under bizarre and cool. We ran into this one yesterday at a client that just upgraded to Master Builder version 13. This bug seems to have been introduced with version 13 of Master Builder and, believe me, it was not easy to find!
In some circumstances, the accounts receivable reports 3-1-2-21, 22, etc. will not print a complete list of invoices for a job or a group of jobs. If you print the report for just a single job, you can get the error message “The page number you entered to print does not exist for this report.”
When we encountered this situation where an AR invoice listing mysteriously stopped without completing, we did all of our standard testing. We reindexed the files (7-4); we replaced all of the .cdx files and reindexed again; we rebuilt the data tables; we ran our own program that can test for many other issues we know can exist in a Master Builder data set. We checked for the know issues with special characters (Sage KB1725) and damaged report files. Nothing worked. Finally, we discovered that the problem was related to the long name of the job as defined in the job screen (3-5).
Out testing revealed that the AR list would stop on the page just prior to the page that a specific job would have printed on. If we printed just the identified problem job, we got the “The page number you entered to print does not exist…” error. Once we identified the problem was a specific job, we could narrow our search for the problem. It turned out that the problem was in the name.
By changing the long name of the job in the job set up screen (3-5), we found we could get the report to print. This effect was repeatable. Use the original name – the report fails. Use a different name – the report works. This is the kind of problem that drives users (and consultants) batty. Once we discovered the source of the problem, we fixed it for the client and went on with our business. Still – we had to know!
What about the job name caused the problem? So, we experimented (later) and we found the pattern. If the characters “IF (“ appear (without the quotes) in the long name of the job, we can crash the report. Why would that be you might ask. Well, we cannot say for sure, but we can speculate. The Master Builder report writer has the ability to interpret formulas. One of the allowed formulas is an “IF” statement which appears like this “IF (a=b) THEN (c).” The characters “IF (“ must be literally entered into the formula. It is possible that the SMB report writer is trying to treat a portion of the job name as a formula. The contents of the formula will not be valid as a job name, so the report writer tries to read an invalid formula and fails. Thus, the report fails.
Try it yourself. It’s fun! Just put the characters “IF (“ in the long name of a job and try to print a list of invoices (3-1-2-21 ) associated with the job you modified. If you are using version 13, you are likely to get a failed report. Remove the characters “IF (“ and the report will work. (law)