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 :
Small and medium business | Business Central, N...
Suggested Answer

Report.SaveAs:The Html output format is not supported by the current report layout format

(2) ShareShare
ReportReport
Posted on by 263

Title:
Report.SaveAs HTML error – “The Html output format is not supported by the current report layout format” when sending Remittance Advice from Job Queue

Product:
Dynamics 365 Business Central (v27)

Scenario:
I created a custom Job Queue codeunit to automatically send Vendor Remittance Advice emails.
The report has both RDLC and Word layouts.

My goal is:

  • Generate PDF from RDLC for attachment

  • Generate HTML from Word layout for the email body

However, when the Job Queue runs, I get the following error:

The Html output format is not supported by the current report layout format.

"Remittance Advice Job Qu. Mgmt"(CodeUnit 50103).SendRemittance line 43
"Remittance Advice Job Qu. Mgmt"(CodeUnit 50103).OnRun line 15
"Job Queue Start Codeunit"(CodeUnit 449).OnRun line 18
"Job Queue Dispatcher"(CodeUnit 448).HandleRequest line 26

Report Setup

  • Report ID: 50105 (Customized copy of Standard Send Remittance Advice from Vendor Ledger Entry)

  • Layouts available:

    • RDLCRemittanceAdvice (RDLC)

    • WordRemittanceAdvice (Word)

Report Selection Setup
Usage: Vendor Remittance – Posted Entries

  • Use for Email Body = Yes

  • Use for Email Attachment = Yes

  • Email Body Layout = Remittance Advice Entries (Word)

  • Report Layout = RDLCRemittanceAdvice

Code snippet

TempBlobBody.CreateOutStream(OutStrBody);

Report.SaveAs(
    ReportID,
    '',
    ReportFormat::Html,
    OutStrBody,
    RecRef
);

TempBlobBody.CreateInStream(InStrBody);

InStrBody.ReadText(EmailBody);

This works for PDF generation, but it does not read data and create email body, but the HTML generation throws the error.

Questions

  1. Does Report.SaveAs(..., ReportFormat::Html, ...) support RDLC + Word layouts in Job Queue?

  2. Is there a recommended approach to generate the email body from the Word layout?

Any guidance would be appreciated. Please Answer as soon as possible.

I have the same question (0)
  • Suggested answer
    Levi B Profile Picture
    14 on at
    Hi there,
     
    1. The HTML report format is only supported for Word layouts, not RDLC layouts.
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/reportinstance-saveashtml-method#error-conditions

    2. You can use the function ReportSelections.GetEmailBodyForVend to get the HTML Body into the Temp Blob based on the selected Word layout:

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,821 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,122 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans