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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How can I create a report that prints the "G/L Entries Preview" in Business Central?

(3) ShareShare
ReportReport
Posted on by 85
Hi all,
I want to create a report in AL that shows the "Preview Posting" G/L Entries (similar to what is shown in the G/L Entries Preview page when we click "Preview Posting" from a sales document).
Is there a way to programmatically access the temporary G/L Entries that are generated by the Preview Posting process?
Specifically:
I want to allow the user to preview posting a document (like a Sales Order),
Then generate a printable report (or printable page) showing the simulated G/L Entries,
Just like the “Preview Posting” page, but with an option to print or export.
I know that Codeunit 19 "Gen. Jnl.-Post Preview" is involved. Has anyone successfully implemented this or have guidance on how to capture the temporary G/L Entries for reporting?
Thanks in advance!
I have the same question (0)
  • Verified answer
    Sagar Dangar, MCP Profile Picture
    799 Super User 2025 Season 2 on at
    Hi,
     
    What is purpose of creating printable report? as it's already showing on page and also you export it to excel using "Open In excel" action
  • Verified answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
    Hi, You can try the following steps, which do not require customization and are quick.
     
    Hope this helps.
    Thanks.
    ZHU
  • Thiran Profile Picture
    85 on at
    @Sagar Dangar, MCP & @YUN ZHU Thanks for your response.
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,148 Super User 2025 Season 2 on at

    EDITED: Apologies for duplicated response

  • Suggested answer
    Sohail Ahmed Profile Picture
    11,148 Super User 2025 Season 2 on at

    One quick solution would be to use Edit in Excel after previewing, if your goal is just to review the G/L Entries. But if you want to generate a printable RDLC report from the Preview Posting data, then yes — you’ll need some customization.

    Here’s how you can approach it:

    1. Use Codeunit 19 "Gen. Jnl.-Post Preview"

      Call methods like RunWithDocument(...) to trigger the simulation. This generates temporary G/L entries in a buffer table (not stored in the database).

    2. Capture the Temporary Entries

      Extend the logic by copying the temporary entries from Gen. Jnl.-Post Preview into your own temporary or buffer table within the same session. You can do this within a wrapper function or via event subscribers.

    3. Design an RDLC Report

      Create a report that uses your buffer table as the dataset. Make sure it's session-based so it prints only after the preview is generated.

    4. Reference Standard Pages

      You can also study Page 14811 "Posting Preview Source" and related pages to understand how BC displays the preview posting entries on screen — useful for aligning your logic.


    5.  

    While not available out of the box, this approach gives you the same simulated G/L Entries as the Preview Posting screen — but in a printable format.

     

    If this helped you, please check the box "Does this answer your question?"

  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,443 Super User 2025 Season 2 on at

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,362

#2
YUN ZHU Profile Picture

YUN ZHU 867 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans