web
You’re offline. This is a read only version of the page.
close
Skip to main content
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

I have the same question (0)
  • Verified answer
    Iulian Cordobin Profile Picture
    8,201 on at
    RE: How to print Customer account statement report as a single file with all records

    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
    28,919 Moderator on at
    RE: How to print Customer account statement report as a single file with all records

    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
    RE: How to print Customer account statement report as a single file with all records

    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,036 User Group Leader on at
    RE: How to print Customer account statement report as a single file with all records

    is that internal statement of external ??

  • syed baber Profile Picture
    11,633 on at
    RE: How to print Customer account statement report as a single file with all records

    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,036 User Group Leader on at
    RE: How to print Customer account statement report as a single file with all records

    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
    RE: How to print Customer account statement report as a single file with all records

    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,036 User Group Leader on at
    RE: How to print Customer account statement report as a single file with all records

    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
    RE: How to print Customer account statement report as a single file with all records

    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
    RE: How to print Customer account statement report as a single file with all records

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
AlissonGodoy Profile Picture

AlissonGodoy 2

#2
NNaumenko Profile Picture

NNaumenko 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans