Skip to main content

Notifications

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 907
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 !
  • Momochi Profile Picture
    Momochi 907 on at
    SSRS: How To Customize General Journal Report to Add Tax Lines Records?
    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?
  • Momochi Profile Picture
    Momochi 907 on at
    SSRS: How To Customize General Journal Report to Add Tax Lines Records?
    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
    Momochi 907 on at
    SSRS: How To Customize General Journal Report to Add Tax Lines Records?
    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.
  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    SSRS: How To Customize General Journal Report to Add Tax Lines Records?
    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.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    SSRS: How To Customize General Journal Report to Add Tax Lines Records?
    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.

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…

Vahid Ghafarpour – Community Spotlight

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

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans