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

Error on customer statement generating

(4) ShareShare
ReportReport
Posted on by 615

Hello experts, 

Has anyone experienced this error while running the customer statement report?  

“The error, The data does not represent a valid JSON token., occurred when running report Customer Statement for Customer: ”

We are running on BC 28.3.

  • Suggested answer
    Teagen Boll Profile Picture
    3,868 Super User 2026 Season 2 on at

    I haven't seen that error myself but if you are getting a JSON error that means there is some invalid data somewhere on a customer card or you have a customization that isnt pulling data correctly.

    I would check a few things. Do all customers have a valid Currency code? Do they all have valid posting groups that don't include special characters like &, %, (, ), # etc? Look at all the fields that could print on the report and look at your customer list and make sure that all options are valid especially if they are lookups to other tables including default dimensions.

    Another thing to look at is the report options. Does it work for a single customer and can it be replicated with different filtering options.

    Hope that gives you a good starting point!

    Teagen Boll
  • Suggested answer
    Grigorios Mavrogeorgis Profile Picture
    3,361 Super User 2026 Season 2 on at

    Hi, I haven't hit this exact one on 28.3, so take it as a direction and not an answer. That message is a JSON parse failing on empty or malformed content, and the standard statement report doesn't parse JSON by itself, so something custom is almost certainly in the stack.

    I'd start by narrowing where it comes from. Open Report Layouts, find the layout selected for the statement and switch temporarily to the built-in Microsoft one, if the error goes away the custom layout or its migration is your answer. If it still fails, look at what is installed around statements, payment links, e-invoicing, a portal or document service. Those parse responses in AL and an empty one throws this kind of error.

    A sandbox copy with the extensions disabled one by one usually finds it faster than reading code.

    Glad to help - follow up if anything is unclear.   

    ►  If this solved it, marking it verified helps others too.       

    Regards,
    Grigorios Mavrogeorgis
    Business Central Consultant & AL Developer

    Work: Gmsoft Limited
    Blog:  insidebusinesscentral
    LinkedIn: linkedin.com/in/gregorymavrogeorgis

  • Suggested answer
    YUN ZHU Profile Picture
    103,085 Super User 2026 Season 2 on at

    I ran a quick test and didn't encounter this issue; could it be due to customization? You can paste the full error details from the "Copy error details" action.

    Thanks

    ZHU

  • Suggested answer
    OussamaSabbouh Profile Picture
    19,350 Super User 2026 Season 2 on at

    Hello,

    This is not a normal Customer Statement data error; the message indicates that something in the report execution is being parsed as JSON and contains invalid content. I would first run standard Customer Statement (Report 1316) for one customer using the Microsoft/default report layout, remove any saved report settings/filters, and try Send to → XML (data only): if XML succeeds but normal rendering fails, check/remove the custom report layout or report extension; if XML itself fails, the problem is in the report dataset/AL execution rather than the layout. Also test another customer to determine whether specific customer/ledger-entry data triggers it. Microsoft recommends using the data-only export exactly for separating dataset from layout problems; if this reproduces on BC 28.3 with Report 1316, standard layout, no customization, I would raise a Microsoft support ticket with the correlation/activity ID because that would point to a standard application/platform issue rather than configuration.

    Regards,
    Oussama Sabbouh

  • Suggested answer
    Kognito Profile Picture
    12 on at

    The error message points to a JSON parsing issue rather than a standard Customer Statement data issue. Could you please share the complete error details by copying them when the error occurs (not only the displayed message)? The detailed error information can help identify exactly where the failure is coming from.

    A few things I would check:

    • On the report request page, enable Page Inspection (Ctrl + Alt + F1) and verify which Report ID is actually being executed. Also check the Extension tab in Page Inspection to identify which application owns the report object or related customization.
    • If there is a custom report extension, a copy of the standard Customer Statement report, or an extension subscribing to the report events, it may contain JSON parsing logic that is causing the failure.
    • Review any integrations involved in the process (payment links, document services, e-invoicing, portals, etc.), as these commonly exchange and parse JSON responses. An empty, unexpected, or malformed JSON response from an external service can trigger this type of error.

    If you can share the full error details and confirm whether this happens with the standard Microsoft layout/report or a custom one, it will help narrow down the source.

     

    Hope this helps. If this resolves your issue, marking the answer as verified can help others find the solution more easily.

     

    Regards,
    Krina Kanani, MCP

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

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 719 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 410 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 369 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans