Thursday, April 3, 2014

Cheque_US printing 2 pages

I have been working with this report for some time now.  The idea here was that we needed the cheque to print at the BOTTOM of the page, which, according to microsoft should be really easy!

Needless to say, the settings on this page didn't work.  If I tried to use the 'Check start position' to place the check on the page where I needed it, it would throw an error saying 'The starting position of the check is too far down the page.'  
The other potential solution was to just make the page longer, but then we got 2 pages printing with the 2nd page being blank!


Finally I started digging and found out that the report has 'SlipTxt' boxes at the TOP and the BOTTOM of the report.  This is so that you can have your check print on either end and still have a stub.

From what I can tell, although the bottom 2 text boxes were 'Invisible' they still took up space and forced the printing of a second page.
Once I removed those, half of the battle was won.

The other thing I had to figure out was why I couldn't use the 'Check start position' on the check setup form to push the check further down the page.  BTW, These settings can be found in Cash and bank management -> Common -> Bank accounts -> Set up -> Check

To allow higher numbers such as 8.75 and such, you need to dig into the code in TWO places.  That's right, two places.  The 'Print test' you see here has it's own class where is the 'Generate payments' in the Payment journal lines has another class

Print Test - Classes\BankPrintTestCheque\getDocLength
Generate Payments - Classes\CustVendCheque\slipTxtLines

You will notice that you see a switch statement in each of them that looks like this:
 switch (_chequeFormType)
        case ChequeFormType::USStyle,
            ChequeFormType::FRStyle :            
            chequeDocMm = 88.89;          

To allow larger numbers, you will need to change the 88.89 to something much lower.  I did mine to 18.89 and that seemed to be good enough to do what I wanted.

Good luck!

No comments:

Post a Comment