Earlier I wrote about using the native script for the RM Historical Aged Trial Balance report. This is an example of using that script in a report.
Because we're using a stored procedure from Dynamics GP, we have to use a 'Select Into' approach to get the stored procedure fields into a table. I created all the fields in the temp table as VARCHAR(100) except for the fields that I needed, those I typed correctly. There are 87 fields and time was a concern. The job of correctly typing those fields is left to you <smiles>
The resulting stored procedure produces this output. It is summed by customer: