| Docs Help
  AppSource  
Docs  /  NCDT Document Text  /  Appendix

 Information for Developers


2024/08/01 • 3 min. to read
NCDT Document Texts provides a set of standard documents that contain the Document Texts and can be used without customization. If this is not sufficient for your company or your documents need to be customized, you can also use NCDT Document Texts on your own documents. In the following section you will find the required modifications to add the NCDT Document Text to your documents.

Customize individual reports to use NCDT Document Text

NVXDT Report Management

To customize your documents to use the NCDT Document Text the codeunit NVXDT Report Management is important. With the function GetReportText the texts can be HTML formatted or integrated as normal text. This allows you to create the documents either in Word format or as RDLC Report.

GetReportText

procedure GetReportText(RecordVariant: Variant; NVXDTTextType: Enum "NVXDT Text Type"; AsHTML: Boolean): Text

Parameters

  • RecordVariant Here the record for which the texts are to be inserted is passed as a Variant. This can be e.g.: a Sales Header, Purchase Header or also Sales Line or Purchase Line.

    Important

    It is important to make sure that the correct filters are set on the RecordVariant.
  • NVXDTTextType The parameter specifies what kind of text lines should be inserted. Ex: Beginning Text, Ending Text, Line Text, Payment Terms Text etc....
  • AsHTML Specifies whether a text should be returned html formatted, this is used in RDL(C) reports, or as normal text, this is used e.g. in Word reports.

    Important

    If the text has to be implemented as HTML text in your report, a placeholder with the option HTML - interpret HTML tags as styles must be activated in the RDL(C) layout.

Implementation

To use Document Texts on a report, columns must be added to the report dataset with the return value of the GetReportText function. Here is an example using the report Order as it is integrated in NCDT Document Text:
reportextension 70714787 "NVXDT Purchase Order" extends Order
{
    dataset
    {
        add(CopyLoop)
        {
            column(NVXDTBeginningText_RDLCText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Beginning Text", true)) { }
            column(NVXDTBeginningText_WordText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Beginning Text", false)) { }
            column(NVXDTEndingText_RDLCText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Ending Text", true)) { }
            column(NVXDTEndingText_WordText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Ending Text", false)) { }
            column(NVXDTShipmentText_RDLCText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Shipment Method Text", true)) { }
            column(NVXDTShipmentText_WordText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Shipment Method Text", false)) { }
            column(NVXDTPaymentText_RDLCText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Payment Terms Text", true)) { }
            column(NVXDTPaymentText_WordText; NVXDTReportManagement.GetReportText("Purchase Header", Enum::"NVXDT Text Type"::"Payment Terms Text", false)) { }
        }
        add(RoundLoop)
        {
            column(NVXDTLineText_RDLCText; NVXDTReportManagement.GetReportText("Purchase Line", Enum::"NVXDT Text Type"::"Line Text", true)) { }
            column(NVXDTLineText_WordText; NVXDTReportManagement.GetReportText("Purchase Line", Enum::"NVXDT Text Type"::"Line Text", false)) { }
        }
    }

    rendering
    {
        layout("NVXDT Purchase Order")
        {
            Caption = 'NCDT Purchase - Order', comment = 'DEU="NCDT Einkauf - Bestellung"';
            Type = RDLC;
            LayoutFile = './NVXDTPurchaseOrder.rdlc';
        }
    }

    var
        NVXDTReportManagement: Codeunit "NVXDT Report Management";
}


Submit feedback for
DE|EN Imprint