Print Proforma Report for a Sales Order using only selected Sales Lines

Hi,

I need to print (and not post) a Sales Invoice Proforma Report for a few Sales Orders using their salesIds. The problem is, with this code

SalesFormLetter salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);

SalesTable salesTable;;

;

salesTable = SalesTable::find(‘FUAE-000002’);

salesFormLetter.salesTable(salesTable);

the whole Sales Order will be included in the report, including those lines I do not want included (because they do not fall within a particular date, or of a certain type)

How do I tell Ax that I want only, say salesLines where type A or B included in the Proforma report?

What’s your version of AX?

Dynamics Ax 2012 R2