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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

SSRS: How To Customize General Journal Report to Add Tax Lines Records?

(0) ShareShare
ReportReport
Posted on by 1,054
Hi dears!
 
In GeneralLedger Report (Path: Genneral Journal > Print > Journal), the tax lines (TaxTrans) are not included in the details of the report.
I want to add the taxes as a line in this standard report.
I am unable to get the LedgerJournalTrans values in the extension of the LedgerJournalDP.insertFromLedgerJournalTrans() method to select the TaxTrans related records to insert it in the LedgerJournalTmp table.
And if I am using the Table Events (OnInserted & OnInserting) in LedgerJournalTmp to achieve this, the event handler in the class I created is not being called when I run the report...
Please let me know what I need to do or what am I missing.
 
Any advice is appreciated !
 
Thanks in advance !
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Try COC on this method. 
     
    protected void insertTransactionsFromLedgerJournalTrans()
     
    Here, I guess you should have a transaction ID. Using that you can do update logic.
     
    Please try and let us know.
  • Suggested answer
    GirishS Profile Picture
    27,845 Moderator on at
    Hi Momochi,
     
    They are using insert_recordset on the code - I think that's the reason why your event handlers are not getting called.
    Instead of updating the whole bunch of records once again - My suggestion will be duplicating the report and add your logic as you want.
    But duplicating the report also has one disadvantage where the update releases for the report from Microsoft won't reflect on your custom report.
     
    Thanks,
    Girish S.
  • Momochi Profile Picture
    1,054 on at
    Hi @Bharani Preetham Peraka,
     
    I'm trying to insert the tax lines not update the journal lines.
    I tried using CoC and after using:
    next insertTransactionsFromLedgerJournalTrans();
     
    I'm trying to insert records after this but I was shocked the the new records I inserted did override the original records and only the records I inserted only available in the report now.
  • Momochi Profile Picture
    1,054 on at
    Hi @GirishS,
     
    Thanks for clarifying that "insert-recordset" does not trigger the events.
     
    I'm just trying to insert the tax records lines from "TaxTrans" table. When I used the CoC, after I inserted the tax lines into the "ledgerJournalTmp" table, the report only displayed the tax lines which I inserted in my custom code, and the original journal lines are not there... why my insertion removed the records that are inserted by the original code? I'm confused 😕 
  • Momochi Profile Picture
    1,054 on at
    I was able to add the tax line into the report through doing a CoC next to the following method "LedgerJournalDP.insertTransactionsFromLedgerJournalTrans()"
     
    doing a while select statement to the ledgerJournalTableTmp table and joining the TaxTrans Table like the following:
    while select * from ledgerJournalTableTmp2
                join ledgerJournalTrans
                join _taxTrans
                where ledgerJournalTrans.JournalNum == ledgerJournalTableTmp2.JournalNum
                && ledgerJournalTrans.TableId == _taxTrans.SourceTableId
                && ledgerJournalTrans.RecId == _taxTrans.SourceRecId
    {
          // Populate the tmp table fileds and then insert()
    }
    But this is not enough, I'm stuck in another issue which is the "Offset lines".
    The offset lines amount needs to be updated with added tax amount. The total amount of credit and debit are not matching in the report.
    The method that inserts the Offset lines is a private method and I'm unable to find a way to write an SQL statement that loops through the offset records on the LedgerJournalTmp table to update the amount of the offset lines on the report...
     
    Any idea how to identify the offset lines in the tmp table?

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 245 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 227

#3
Subra Profile Picture

Subra 184 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans