Skip to content

pePDFFacturXRelationship - cDRReport

Methods - Properties - Events

Type

Integer

Default

C_drPDFFacturX_Rel_Alternative FacturX RelationShips

Arguments

None

Description

The Relationship attribute specifies the relationship between the PDF document and the embedded XML invoice.

For ZUGFeRD and Factur-X invoices, the XML file is normally embedded with the relationship value: Alternative

This means that the XML invoice and the PDF representation contain the same invoice information in different formats:

  • The PDF is intended for human reading.
  • The XML is intended for automated processing.
  • Both represent the same business document.

Other relationship values defined by PDF/A-3 exist, but they are generally not used for standard ZUGFeRD or Factur-X invoices.

Can be retrieved or set after the OCX is initialized.

DataFlex Framework Usage

  • Web
  • Windows
  • FlexTron

Sample

Object oReport is a cDRReport
    Set psReportName to 'MyReport.dr'
End_Object

Object oExportToPDFReportButton is a Button
    Set Label to 'Export Report to PDF'

    Procedure OnClick
        String sReportId

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Set psPDFXMLFileName of oReport to 'c:\test\facturx.xml'
            Set pePDFFacturXRelationship of oReport to C_drPDFFacturX_Rel_Data
            Set pePDFFacturXProfile of oReport to C_drPDFFacturX_XRechnung
            Send ExportReport of oReport C_drPDF 'c:\tmp\MyReport.pdf'
        End
    End_Procedure
End_Object