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

Announcements

News and Announcements icon
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
    813 Moderator 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
    101,995 Super User 2026 Season 1 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,177 Super User 2026 Season 1 on at

    EDITED: Apologies for duplicated response

  • Suggested answer
    Sohail Ahmed Profile Picture
    11,177 Super User 2026 Season 1 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
    22,792 Super User 2026 Season 1 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,050 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,351 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,200 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans