web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to print Customer account statement report as a single file with all records

(0) ShareShare
ReportReport
Posted on by 11,633

Hi,

When we run Customer account statement report for multiple customers, it opens the report in a separate window for each customer and same in case of File. Is it possible to allow the report to show all records in one window with each customer record on separate page?

Thanks,

Baber.

*This post is locked for comments

  • Verified answer
    Iulian Cordobin Profile Picture
    8,201 on at

    I don't think it can be done via standard parameters: I see that in the Print Management form this can't be specified and also in the reports parameters there is not way to set this. I think you have to do a code customization.

  • Verified answer
    Guy Terry Profile Picture
    29,028 Moderator on at

    I've seen a solution which had nothing to do with AX. A PDF creation package was used (CutePDF, I think). If you print the statements to the PDF printer, the PDF package was easily able to combine them into one PDF.

    You can look at this on-screen, and each statement will start on a new page.

    Something to think about.

  • syed baber Profile Picture
    11,633 on at

    Thanks Iulian for your response. Do you know where to customize the code in order to achieve this functionality or any example which you can share?

    Baber.

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    is that internal statement of external ??

  • syed baber Profile Picture
    11,633 on at

    Hi Sohaib,

    It is External statement report, the internal one extends from SrsReportRunController, so that opens in a single window.

    Thanks,

    Baber.

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    runPrintMgmt (method) of CustAccountStatementExtController (Class) is managing the logic to print report one by one for each customer

     

    while(partyQueryRun.next())

           {

     

    //technically this report is looping over each customer and its collecting transactions of that customer (custTrans), by a query which is being managed in createBaseCustTransQuery (method) of CustAccountStatementExtController

    Previously for this report I found a bug also which is here

    https://community.dynamics.com/ax/f/33/t/155192

     

     

     

  • syed baber Profile Picture
    11,633 on at

    Thanks for the details Sohaib and good to know about the bug in this report. Regarding the question, the things you have mentioned, I already looked at the logic, tried different things with outputReports method called inside runPringMgmt, but all in vain.

    Considering this, I am thinking of creating a new DP and controller class, just like for internal account statement and copy the existing logic from controller to new DP class.

    Thanks,

    Baber.

  • Verified answer
    Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    Yeah it would be much easy to create a new report than modifying exiting.

    All you can do is following.

    1. Create a query same as report has current, but don’t use no-exist join

    2. Create a temp table

    3. Create your RDP class which will do something as under

      While(qr.next())//here queryrun same which is in step#1

      {

                      //create query for custtrans same as createBaseCustTransQuery (method) of CustAccountStatementExtController

      //take these custtrans records and .insert into your temp table.

      }

       

      Another point, this current report shows settlements also, whereas External account statement is an external document. And my customer should not bother about settlements of my financials. Customer is interested only in ‘What I have paid’, ‘what invoices I have received’ and ‘and how much I have to pay more/remaining payable ’

      So include another range in custtrans as localCustTrans.TransType != LedgerTransType::Settlement

      Overall it would be as under

       

      while select localCustTrans

                 order by localCustTrans.TransDate ASC

                 where localCustTrans.AccountNum == _custAccountNum

                         && localCustTrans.TransDate >= _fromDate && localCustTrans.TransDate <= _toDate

                         && localCustTrans.TransType != LedgerTransType::ExchAdjustment

                             && localCustTrans.TransType != LedgerTransType::Settlement

       

    Group your report by CustAccountNum and put a a page break at end of each group

  • K K BHARGAVA Profile Picture
    120 on at

    Hi Syed,


    Now I have the same requirement which you had earlier. Have you got any solution and if yes please help me on the same.

    Thanks,

    K.K. Bhargava

  • syed baber Profile Picture
    11,633 on at

    Sorry, I didn't get any solution for this. Customer requirement was dropped, then I didn't do further research on this. But you can look at how Internal customer account statement report works and replicate the functionality from there.

    Thanks,

    Baber.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Prashant Singh Profile Picture

Prashant Singh 2

#1
nmaenpaa Profile Picture

nmaenpaa 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans