Standard process to get the Document notes in Ax 2012 SSRS Reports (Document Handling)

How to get the Document notes in Reports

  1. First add the attachement for the SO using the action pane button attachements(For Header doc attachement)
  2. Second add the attachement for the SO using the Line action pane, SalesOrderLine–>Attachments–>Attachements(For Lines doc attachement)
  3. While adding consider the below constrains
Constrains
* DocuOnFormular – All & Head
* DocuOnFormular – All & Line
* Type = Note
* DocuRestriction – Restriction = External

In SalesPackingSlipDP Class
For Header setSalesPackingSlipHeaderTmp()
if ((custFormletterDocument.DocuOnPackingSlip == DocuOnFormular::Head)
     || (custFormletterDocument.DocuOnPackingSlip == DocuOnFormular::All))
    {
        docuRefSearch = DocuRefSearch::newTypeIdAndRestriction(custPackingSlipJour,custFormletterDocument.DocuTypePackingSlip,DocuRestriction::External);
        salesPackingSlipHeaderTmp.MainNotes                 = Docu::concatDocuRefNotes(docuRefSearch);
    }
For Line setSalesPackingSlipDetailsTmp()
if ((custFormletterDocument.DocuOnPackingSlip == DocuOnFormular::Line)
                         || (custFormletterDocument.DocuOnPackingSlip == DocuOnFormular::All))
{
     docuRefSearch = DocuRefSearch::newTypeIdAndRestriction(custPackingSlipTrans,          custFormletterDocument.DocuTypePackingSlip,DocuRestriction::External);
     salesPackingSlipTmp.Notes                   = Docu::concatDocuRefNotes(docuRefSearch);
}