Add new field on Sage 200 reports

SOLVED

Hi all,

I would like to add new fields from my custom tables, to existing Sage 200 reports. What is the correct step/best way to do it? I was thinking of just amending the reports in "C:\Sage\reporting\default\reports" and save. But what is the dos and don'ts, especially when it comes to compiling it into a sandbox and install to another server.

  • +1
    verified answer

    There's a few aspects to this.

    Firstly you need to make sure that your fields - whether they're in an extension to an existing Sage 200 table or in a table of your own - are exposed to the DataModel.

    There's a simple utility built into the SDBX packager under Tools -> Custom Model Builder which will walk you through building a Model Extension which is packaged and deployed like any other Add-on. You'll need to install the model extension on to your test system and restart Sage 200 so you can modify reports and include your fields. of course, this model extension would have to be installed on your client site as well.

    Secondly you need to understand the reporting directory structure. Under sage\reporting you will find a number of subfolders but the ones we are interested in are 'default', 'custom' and 'company'. When sage 200 is looking for a particular report/layout/label then it will start in the most specific location (company) and work to the least specific (default).

    As an example we'll take the Sales Ledger Day Book Report. Out of the box this is in reporting\defaults\reports\sales. So when Sage 200 runs this report then that's that actual files it'll use. Say we make some modifications to the report and save it in reporting\custom\reports\sales with the same filename (and this is what you'd typically do, leaving the original default reports untouched). At runtime Sage 200 will find the custom file before it finds the default one, so the custom one will run. Finally we could make another revision of the file and save it in reporting\company\<COMPANY NAME>\reports\sales. If we run the report when we're in that Sage 200 company it'll find the specific company file first and use that. If we were in any other company then it wouldn't find anything at the company level and instead use the custom one - or the default one if there was nothing at the custom level.

    You can package an actual report file into your SDBX for deployment to a client site - but it will only allow you to deploy to the \custom folder, not to the \company level (unless you package it as a Resource rather than a Report File, and that's getting a bit off topic). If we stick with our example where we've created a custom Sales Ledger Day Book, then you could add it into an SDBX with a file type of 'ReportingFile', a RelativeDeploymentPath of 'sales' and a ReportingFiletype of 'report', and that would find its way into the sage\reporting\custom\sales folder when the SDBX is installed.