I want to add LedgerTrans.DocumentNum field to BankAccountStatment report
BankAccountStatment report has a datasource "BankAccountTable"
How can I perfrom this?
Note: LedgerTrans.DocumentNum can be reached through BankAccoutTrans.AccountId = BankAccountTable.AccountId then LedgerTrans.voucher = BankAccountTrans.Voucher
You can try declaring
LedgerTrans ledgerTrans;
inclassDeclaration
and adding following code in the report'sfetch
method before callingelement.send(bankAccountTrans)
:After that you'd only need to add a new display field in the
ReportDesign\AutoDesignSpecs\Body:_2
section with the following code:I didn't try it but it should work. As an alternative you can declare ledgerTrans in the
fetch
method, addelement.send(ledgerTrans)
after selecting ledgerTrans, and add a standardString
field in the section mentioned above,Table
=LedgerTrans,DataField
=DocumentNum. Then no display method is needed.P.S. I assumed you're using AX 2009 but for other versions of AX the logic remains the same.