Video Designing Overflow Checks in D365FO

This article describes how to design a check using Docentric AX Designer when the check transactions span multiple pages, making it so-called overflow checks. Let us say our goal for today is to design a check that will be placed in the middle of the page, with one slip above it and one slip below it. Both slips will contain identical information. One slip will go to the recipient, and the other one will be kept for our records. For this example, two pages are needed to fit all transactions, so the end result will look similar to the sample in the image below:



This article builds on two earlier articles that describe check design in great detail. If you have not read those two articles yet, I invite you to read them first and watch the videos they contain:

The above articles contain some basic information about checks and many useful design tips that I will not repeat in this article. For today’s scenario, I will simply reuse an already prepared check design from the Docentric AX SSRS Replicas model and modify it to support the overflow checks. This model must be installed in order to design the template used in this article.

The Docentric AX SSRS Replicas model is an optional, but warmly recommended module, which comes with over fifty most commonly used SSRS report replicas, designed with Docentric AX Designer. The model also contains Data Source Provider (DSP) classes where the data can be reshaped or added using easy-to-use APIs.

The rest of this article contains a written description of the overflow check design. If you read it to the end, you will understand the concepts and design techniques. There is also a video clip of the overflow check design. Watch video >>

Check layout settings in D365FO

Successful implementation of overflow checks requires some settings in the standard D365FO. Standard SSRS check relies on the check layout settings, which can be set on bank accounts, by following these steps:

  1. Select Cash and bank management > Bank accounts
  2. Open the bank account record for which you want to define the check layout
  3. Click the Check menu item

 

The Check layout form contains a Layout fast tab with several settings:

  1. Paper length
  2. Top unprintable margin
  3. Bottom unprintable margin
  4. Check start position: It defines the position of the check (top, middle, bottom) by specifying this position
  5. Number of slip copies

These settings also define the size of the check slip(s). The system then calculates how many lines of transaction data fit on a slip. If all transactions fit on one slip, the system will use one check. If there are more transactions, the system will use as many checks as needed to fit all related transactions, but all except the first check will be voided.

The values shown above can be used as starting values for 8.5 by 11-inch paper size.

Continue by running a SSRS check report and see how many transaction lines fit on one slip. Make sure that the check you are using for this test has sufficient number of transactions to test the overflow.

If there are more or less lines on a slip than you want, experiment with changing the Bank accounts > Check > Check layout > Layout settings until you get the desired result.

The image below shows how the overflow looks like on the second page. We see that the first slip (#1) is filled, but it is not showing all the transactions and so the remaining transactions are displayed on the second page (#4). The same applies for the second slip (#3 and #6).

The check on the first page is filled in completely (#2). It contains the total amount of all transactions. The check on the second (overflow) page uses the next check number, but it is marked as Void. If there were more transactions, this overflow pattern would repeat with the next voided checks on the next pages.



So, what was the point of running the SSRS report if we are going to design a Docentric template?

Well, it is usually a good idea to analyze the standard SSRS output before working on a Docentric design. In this case, we are interested in the check slip information. The entire content of the slip in the SSRS output is a single string of characters with line breaks after each line. Therefore, the Monospaced font is used to align the data in columns.

Designing the overflow check in Docentric AX Designer

As mentioned at the beginning, we will not be designing this check report template from scratch this time. Instead, we will use the template available in Docentric AX SSRS Replicas model.

Open the Docentric AX reports form and select the check report you need. For this article we will use the US Cheque report (see below). We also have to enable the setting to generate the DDSP file (Docentric Data Source Package). This is the file which contains the information about the data schema, available labels, and some test data for this report. We will need this file to load some test data into the Docentric AX Designer.
 

After enabling the flag for generating the DDSP file, we save the setting and return to the previous form.

Under the Templates fast tab there are several designs for different check layouts. Since we want the check in the middle and the slips above and below, we’ll select the template named Check_US_Report_CheckInTheMiddle_2Slips (see #1) and click the Download menu item (see #2).



Then we open the downloaded template using MS Word. We also need Docentric AX Designer Add-in for MS Word installed for the rest of the steps.

Docentric AX Designer is an Add-in for Microsoft Word which empowers even non-technical users (power users, functional consultants or business users) to design the templates for reports in D365FO. You can request a trial version to test its capabilities.

Generating the DDSP file

Before continuing with the design, we will generate the DDSP file to obtain the test data which we will use for testing the layout during the design phase.

Make sure to find a check with a sufficient number of transactions, so that they won’t fit on a single check stock page.

Continue by printing the check on the screen. The DDSP file will be downloaded when printing is complete. This DDSP file contains the data of the check you just printed.

You can set Generation options > Generate DDSP when report runs back to No now. Otherwise, a new DDSP file will be generated and downloaded every time the Cheque_US report is run.

Designing the slips

Docentric check templates which don’t support the overflow are displaying the slip content using the BankChequePaymTrans records. These records are not available in SSRS data, but were added through the Docentric Data Source Provider (DSP) class. This allows the complete control over column order, text format, number of columns, etc. All transaction records are added to the regular checks – in other words, even if SSRS data contains voided checks, only regular checks will be printed and voided checks will be skipped.

However, if we want to display voided checks and split transactions across multiple pages, we will not use the BankChequePaymTrans records. As explained earlier, SSRS check already counts the transactions and splits them into as many pages as needed and puts this information into a single string field in each ChequeTmp record. We will use this string field instead of the list of BankChequePaymTrans records, so replacing the content of the slips will be our next task.

Once the template is open, we will first empty the content of both slips. Just click somewhere in the slip Text Box and press Ctrl+A to select all Text Box content and delete it. Repeat it in the second slip.



After deleting the contents from both slips, set the font to Courier new and font size to 10. Courier new is a monospace font, which is needed for correct display of the slip content in overflow checks.



Next task is to add the Field tagging element from Docentric AX menu into the slip Text Box and bind it to the SlipTxt field in the Current Data Context. Repeat this process for the second slip as well.


Designing the check

There are just a few details that we need to modify on a check to support the overflow scenario. Basically, we have to detect if we are printing the first or subsequent pages of check transactions. On the first page we need a regular check, on each subsequent page, however, we need a void check.

This is easy to do, because the CheckTmp records contain a BankCopySignatureText field, which contains the text “Void” for voided checks. We will therefore add conditional content on a check which will be driven by the value of the BankCopySignatureText field. Voided checks will display the text “Void” instead of the amount in words and the signature.

Our existing check design displays the signature in a Text Box, anchored in the page header. Since it is linked to the header, the signature would be displayed on every page, which wouldn’t be correct in case of the voided checks. To correct this, we will edit the header by selecting Insert > Header > Edit Header in MS Word. Then we will delete the entire Text Box, as marked in the image below and close the header afterwards.



In the next step we want to add the text “Void“ to the voided checks. Because the BankCopySignatureText is empty for regular checks and AmountInWords is empty for voided checks, we can simply just add the Field tagging element next to the already existing AmountInWords Field tagging element and bind it to the BankCopySignatureText field. To make the template tidier, we can modify the text in the Field tagging element in the template from @BankCopySignatureText to VoidText1. The “Void” text that will be a result of the BankCopySignatureText field needs to stand out, so we set this field as bold and increase its size to 18. The result looks like in the image below.



The second “Void” text will come into the cell reserved for the signature. First, we will set centered horizontal and vertical alignment. Click in the cell where you want the void text to appear (see #1 below). Then select centered paragraph alignment (#2). Afterwards, open the Table Properties dialog by right-clicking in the cell and selecting Table Properties. Set a centered vertical alignment (#3).



And then we insert and bind the Field tagging element, just as we did it earlier. We can shorten the displayed text in the template to look tidier, just as we did before.



Let us now preview the report. We can see that the amount in words is displayed correctly on the regular check (see #1 in the image below) and also the voided check displays the correct text (#2). The only thing still missing is the signature (#3).



So, let us add the signature again, this time it should be printed only on the regular, non-voided, checks. Click on one of the empty cells in the check design and select Insert > Text Box > Draw Text Box and draw a Text Box as shown in the image below. Then fix its position on the page.



We want the signature to be centered so we select Home > Paragraph > Center alignment. Now it’s time to insert the signature. Signature is always contained only in the first CheckTmp record, so we will apply an XPath filter CheckTmp[1] which returns the first record. It is also important to select MainData as the Binding Source, because this way we have access to all records and can select the first of them.



Now we resize the image as needed. We need to make sure it will be printed only when needed, so we wrap it with the IF tagging element bound to the expression BankCopySignatureText = ” (note two single quotes, not one double quote). This expression will show the signature only on checks that are not voided, which means only on the first page.



And finally, the last design step is removing the border line of the Text Box and making it transparent. Right-click the rotation handle of the Text Box (#1) and choose Format Shape (#2).



Select No fill and No line as shown below.



Let’s preview again to see if everything looks as we expect.



There we go! Everything looks just as we want. Mission accomplished!

Activating the new template

We now want to activate this template in D365FO. We will rename our template to some name which tells what the file contains, for example Check_US.Report_CheckInTheMiddle_2Slips_Overflow.docx.
Then we will open the settings for Cheque_US.Report in Docentric AX reports form and add a new template definition. This opens a new form for entering the Template ID name. You can use the same name as you used for the file name: Check_US.Report_CheckInTheMiddle_2Slips_Overflow. Then save and close the form to return back to the report settings.



Now it’s time to attach the template file. Click Template file > Attach as shown above. A new form will open where we select the Current storage type, which will be Azure Blob storage in our case. Then we can upload the file.



After the file is successfully uploaded, we get the Infolog message about it. Now we can close this form.



We can also set the new template as the default template, by selecting the template and clicking the Set as default menu item, if that is required. The image below shows that our newly added template is set as default and is ready to be used by the D365FO users who are printing the checks.


Check overflow limitations

As you can see it is not that difficult to design a default Docentric check template so that it supports the check overflow. But there is one limitation, and it refers to the content of check slips. We rely on the slip content, generated during the SSRS pipeline and we are just displaying it on our check stock paper. You cannot add or modify the slip content – like adding or removing columns, changing font – except with another monospace font. If you wanted to do that, the customization in the SSRS data provider class or Docentric DSP class for the check would be required.

Resources

Docentric Check replicas templates which ship with the Docentric AX SSRS Replicas model before version 3.4.4 rely on printing the transactions on the Payment advice report if all the transactions cannot fit on a single check stock paper. Starting with version 3.4.4 and higher, the Docentric AX SSRS Replicas model contains all combinations of overflow check templates.

Download Docentric AX SSRS Replicas >>

Video recording


 

Leave a Reply

Your email address will not be published.

*

Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>