Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Report not getting transaction according to date

(0) ShareShare
ReportReport
Posted on by 1,479

 I  have created report which brings daily transaction , but when i select the date filter its skipping the date which is not having transaction ,

e.g  if i am selecting date from 1/3/2023 to 31/3/2023  its getting only transaction of 31/3/2023 but i need to show remaining transaction also like

1/3/2023

2/3/2023

3/3/2023

4/3/2023

5/3/2023....and so on.

so how can i get this done my code is below. can anybody have suggestion on this so  i can increment the value by date till todate . plz guide me on this.

  qbdsGenalAcEntry = qbdsMainAccount.addDataSource(tableNum(GeneralJournalAccountEntry));
                qbdsGenalAcEntry.joinMode(JoinMode::InnerJoin);
                qbdsGenalAcEntry.addLink(fieldNum(MainAccount, RecId), fieldNum(GeneralJournalAccountEntry, MainAccount));

                qbdsGeneralJourEntry = qbdsGenalAcEntry.addDataSource(tableNum(GeneralJournalEntry));
                qbdsGeneralJourEntry.joinMode(JoinMode::InnerJoin);
                qbdsGeneralJourEntry.addLink(fieldNum(GeneralJournalAccountEntry, GeneralJournalEntry),fieldNum(GeneralJournalEntry, RecId));
                qbdsGeneralJourEntry.addRange(fieldNum(GeneralJournalEntry, AccountingDate)).value(queryRange(fromDate,toDate));

                QueryRun    qr = new QueryRun(query);


                while (qr.next())
                {
                    MainAccount mainAccount = qr.get(tableNum(MainAccount));
                    GeneralJournalAccountEntry genJourAcEntry = qr.get(tableNum(GeneralJournalAccountEntry));
                    GeneralJournalEntry genJourEntry = qr.get(tableNum(GeneralJournalEntry));

                    cashBalTmp.clear();
                    cashBalTmp.DTDataAreaID = _dataAreaId;
                    cashBalTmp.MainAccountId = mainAccount.MainAccountId;
                    cashBalTmp.Name = mainAccount.Name;
                   
                    cashBalTmp.AccountingDate = genJourEntry.AccountingDate;
                     
                    cashBalTmp.TransactionCurrencyAmount = genJourAcEntry.TransactionCurrencyAmount;
                    cashBalTmp.insert();
                }

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: Report not getting transaction according to date

    Hi Dinesh, The issue should be in Query, try adding below line at Line# 11 and check value in queryString variable to investigate the query generated from your code.

    Str queryString = qr.toString();

    Please delete the below duplicate thread

    community.dynamics.com/.../report-not-getting-transaction-according-to-date

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans