Invoice Data Report Templates

Report templates are created using Crystal Reports.

Report Template Editing

To make 'tables' available to the report:

  1. In the Database Expert screen of Crystal Reports Designer:
    1. Select the Data tab.
    2. In the Available Data Sources tree, expand the NewDataSet node.
    3. Select tables and click the arrow buttons as required to more tables to the Selected Tables tree.
    4. Click OK.

      The 'tables' and their fields display in the Field Explorer. The fields can be dragged from this explorer to the report design surface.

Note: For further information about editing report templates with Crystal Reports, see https://help.sap.com/docs/SAP_CRYSTAL_REPORTS.

Subreports

The data listed in a subreport cannot be changed. The subreport is the responsibility of the RPT because it is managed internally. The RPT should use data from the XML as the entry point (parameter) to run the subreport. If subreports are based on something not exposed in the XML, then the data needs to be added using the invoice XML script and then the subreport needs to be developed.

Calling a DLL Instead of a Report

It is possible to call a DLL and have it display in the Reports tab of the invoice screen.

Add the custom DLL as a reference. Then in the method, instance a class from that DLL and execute a custom method, ensuring that the method returns, and that the XML document is passed to the invoice screen for display.

Copy
using System;
using Mincom.MineMarket.DAL;
using Mincom.MineMarket;
using Mincom.MineMarket.Server;
using System.Data;
using System.Xml;
using CustomReports.Dll

public class InvoiceDataXMLScriptEvent : IInvoiceDataXMLScript
{
    public InvoiceDataXMLScriptEvent()
    {
    }

    #region IInvoiceDataXMLScript Members

    public XmlDocument UpdateDataSet(Invoice inv, XmlDocument originalDocument,
        ArrayList parameters)
    {
        originalDocument = CustomReports.GenXCmlDocument(inv);
    }

    public bool UseScript(Invoice inv)
    {
        return true;
    }

    #endregion
}