The ability to populate PDF reports has long been an essential feature of the Mobile Impact Platform. However, the fixed nature of PDF documents can make it difficult to display data of variable size, such as the contents of a grid. Additionally, data often does not fit a static one-to-one mapping from a form field to a PDF entry. Enter Report Customization, a new feature released in Mobile Impact Platform version 12. With Report Customization, the form designer has complete flexibility to set the values printed on the report by using form script.
Consider a simple form used to collect inspection data:
In this form, observations are entered and collected onto a grid. The form designer then creates a report with bindings between the grid contents and a report table. Also note the page number, which is bound to a hidden field.
The challenge in this scenario is that the grid may contain more than one page (four rows) of data, and the overflow must be printed on a second page. With Report Customization, the form designer can use script code to generate multiple pages and then modify the contents of the additional pages to map to the subsequent rows.
The Mobile Impact Platform script code to handle this case where the number of grid rows is too large for a single report page as defined in NextGen Designer follows.
Note also that the page number is set in script to display the correct value. Report Customization offers great flexibility in generating reports. In addition to multiple-page documents, the form designer can implement conditional output (displaying different values based on the values of other form fields) or can hide printed values altogether.