Using the Support Debugging Tool to assist with Report issues

A new feature to the Support Debugging Tool for Microsoft Dynamics GP build 11 is the support for the rw_ReportStart, rw_ReportEnd, rw_TableHeaderString, rw_TableHeaderCurrency, rw_TableLineString, and rw_TableLineCurrency report writer user defined functions.

The Knowledge Base (KB) article below explains how a third party developer can add triggers to the place holder RW functions in the core Dynamics.dic. Then when they are used as User Defined functions from a calculated field in Report Writer, the developer can read the parameters passed in and return the desired data from their data. This allows simple integration of data from a third party dictionary back into a modified report from any product.

The first two parameters for all 6 of the report writer functions is a Product or Dictionary ID and a Report Name. If you set the Dictionary ID to 5261 which is the Support Debugging Tool's ID and the Report Name to the name of a Script ID from the Runtime Execute window, you can run scripts to capture data from calculated, legends, report, or table fields and log them using the MBS_Auto_Log Helper function.

Parameters are passed to and from the Runtime Execute script using the MBS_Param_Get and MBS_Param_Set Helper functions. The Helper Function Assistant window can create template scripts for each of the functions to handle all the parameter passing. For more information see the Support Debugging Tool User Guide manual.

Below are the parameter lists for the functions and examples of how they would be called from a Report Writer calculated field.

To use the rw_TableLineString and rw_TableLineCurrency report writer functions we need to be able to pass the two sequence fields as currency data type. So to use the Sales Order Processing Fields SOP_LINE_WORK.Line Item Sequence and SOP_LINE_WORK.Component Sequence, we will need to create two calculated fields to convert them from a long integer to a currency data type.

Calculated Field (C) Line Item Sequence is defined as result type currency with the expression of SOP_LINE_WORK.Line Item Sequence * 1.00000.

Calculated Field (C) Component Sequence is defined as result type currency with the expression of SOP_LINE_WORK.Component Sequence * 1.00000.