Images only print on first Cheque
I received an e-mail from a customer on the Cheque_US report that I had modified. For some reason, it was printing the CompanyLogo and Signatures on the first check but not the subsequent checks.
To print multiple checks you can go to Accounts Payable -> Journals -> Payments -> Payment journal -> Lines. Make sure your journal has multiple lines and you can use Functions -> Generate payments.
In looking at the code, I found that the ChequeDP class was causing the issue.
*Note: Whenever I have strange issues with reports, I always check the DP (DataProvider) class first to see if I can find out what is going on.
Anyway, continuing on... IN the ChequeDP class we find a method 'addImagesToFirstRow' that will add the images to your Tmp table. The problem here is that in the 'insertChequePrintout' method (Line 74), it checks to see if this has already been done. If it has, it won't do it again. Hence the dilemma of only printing CompanyLogo/Sigs on the first check.
This is standard AX functionality and I believe it has to do with voided checks... You print the first check and then subsequent checks are voided so you don't want the logo / sigs on it? I'm not 100% sure on the reasoning for this, however, if I do find a concrete answer I will update this post.