Armanino Blog
Article

Customizing the AP Check Print Form in Microsoft AX2012 in 3 Steps

November 20, 2013

Most of our Dynamics AX clients want the Check Print Form customized, and often, they want to continue using their existing pre-printed forms. This can present some unique challenges.

1. To begin, each model of printer has its own drivers and accompanying fonts, so you should always test on the actual printer you plan to use, or you may get unexpected results.

2. Next, it's important to be aware of the settings in Cash and Bank Management > Bank Accounts > Setup Tab > Check

3. The stub or remittance is especially challenging, since it is a single block of text. This text is created in the CustVendCheque class.]

  • Depending on which version of AX you are on, the method used is either fillsliptxt, fillsliptxtHF or getsliptxt.
  • The text is passed as a single text field to TmpChequeprintout and later to ChequeTmp, which the SSRS report uses as its data source.
  • This text can be formatted to some extent by padding with spaces and line feeds as you will see in the existing code. It is designed to be printed in a Courier New 10 pt. font
    (Note:
    I DO NOT recommend you try to change this, because if you use a proportional font the different widths of the various characters will cause the columns to wander all over the page).

Also, the settings allow users to define the number of stubs, the position of the check and the size of the paper.

  • These settings make the size of the stub vary, so the program must calculate the number of lines that will fit on the stub taking those settings into account. If you change the font size, that calculation will be incorrect. If you add an additional line to the stub, be sure to subtract from the end-lines variable so the program will know if you have too many lines, in which case, it will print the rest on a voided check (on the next page).
  • There is also a method called "output" which is where it adds the check number to the stub.

The rest of the customizations will most likely be in the report itself. There are a number of reports for this. Which ones get used depends on the check format selected in the Bank Account check setup.

Make sure the font for all of the remittance text boxes you intend to use are set to Courier New 10 pt. There are 2 above the check and 2 below; the ones to be used will be determined by the settings mentioned above. Other than that, the modification is similar to other SSRS reports. You can make fields visible or not and move them around on the page.

Dynamics AX 2012 Bug & Fix

There appears to be a bug in some versions of AX2012, which causes the line-ups to change after the first page. If you print at least 2 pages, and the second page prints slightly higher than the first, you are seeing this bug.

One way to fix this is to delete the text box at the top, which is only intended to be used as a spacer if you are not going to print a remittance and then change the properties of the table to make it start at the top of the page. The bug seems to be causing AX to ignore the conditional formatting and allow space for this box on the first page, even when it shouldn't. After the first page, it works properly. I also noticed the text boxes used to print the stub were not sized correctly on the first page, which caused the check itself to be misaligned. I fixed this by editing the properties for the text boxes to make them the correct size for the remittance.

Stay In Touch

Sign up to stay up-to-date with the latest accounting regulations, best practices, industry news and technology insights to run your business.

Resources
Related News & Insights
The Complete Guide to Working With a Marketing Agency: Unlock Your Business Advantage
Article
Explore what marketing agencies do, types of marketing agencies, pricing and best practices for working with an agency.

December 13, 2024
Nonprofit Fundraising Checklist: Essential Best Practices to Drive Donations Year-Round
Article
Deploy these infrastructure must-haves and key metrics to maximize your fundraising.

December 11, 2024
Want to Thrive in the AI Era? Unify Your ERP and HR Systems
Article
The question: do you stay with a best-of-breed approach or move to an all-in-one system?

December 10, 2024