Add column to report in dynamics AX2009


How can I add a column LedgerTrans.DocumntNum to Report "BankAccountStatment" in Dynamics AX 2009?
Who is Participating?
agusacilConnect With a Mentor Commented:

In the BankAccountTrans table, you can create a new display method like this :

display DocumentNum documentNum()
    return LedgerTrans::findVoucherDate(this.Voucher,this.TransDate).DocumentNum;

Then add a new string control in the Body _2 in the BankAccountStatement with properties set as below :

Table : BankAccountTrans
DataField : <set to blank>
DataMethod : documentNum

Hope that helps.
smetechitAuthor Commented:
Thanks for your solution ... but how fields of BankAccountTrans are displayed in report without adding BankAccountTran as datasource?

Thanks. If you don't want to have BankAccountTrans as datasource then you can create a display method in the report's methods section.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.