AI Reports Troubleshooting
Start with the report itself. In AI Reports:
- Error Message says why a run failed.
- Generation Log shows every step the agent took, including the exact queries.
The sections below go from "nothing happens" to "the numbers look wrong".
The Run Does Not Start or Fails Immediately
| Message or symptom | Cause | What to do |
|---|---|---|
| No AI provider is set up for AI reports… | No provider has AI Report Agent or Spreadsheet Agent switched on. | Open AI Providers and switch AI Report Agent on for the provider to use. See Setup. |
| "Allow HttpClient Requests" is turned off for this extension… | Business Central blocks the outgoing call to the AI service. | Extension Management → AL AI Services → Configure → switch on Allow HttpClient Requests. |
| AI Provider error: … or Http Error: … in the Error Message | The AI service refused the call: wrong or expired access key, wrong endpoint or model name, quota exhausted, service down. | Check the provider's Endpoint, Access Key and Model, and your account at the provider. Generate again. |
| The term … ends before the period starts. | The term formula does not move forward (0D, -1M, …). |
Use a positive term such as 1M or 1Q. Period (today) on the card shows the problem as you type. |
| The background session for the report could not be started: … | Business Central could not start a background session (for example a session limit). | Try again later, or use Generate and Open, which runs in your own session. |
| You do not have access to AI report instruction … | You are not on the instruction's permission list. | Ask one of the owners named in the message. See Permissions. |
The Run Ends as Failed
| Message | Cause | What to do |
|---|---|---|
| The agent did not finish within N model round trips… The report was stored as far as it got. | The report needed more round trips than Max. Tool Rounds allows. The partial page is kept, under a warning banner. | Simplify the prompt: name financial reports, ask for aggregated breakdowns, fewer sections. Or raise Max. Tool Rounds on AI Report Setup (for example to 60). The log shows where the time went: many small queries often mean the agent was searching for the right table. Name it in the prompt. |
| The agent finished without writing the report (no aireport_write call). Its last message: … | The model stopped without producing a page. The last message usually says why: it could not find data, misunderstood the task, or the model is too weak for tool use. | Read the last message and the log. Make the prompt more concrete, or use a stronger model. |
| A provider error part-way through | The service failed during the run (rate limit, timeout). | Generate again. For frequent rate limits, lower the load: fewer parallel runs, or a higher-tier plan at the provider. |
A failed report never stops a schedule: the next scheduled run starts as planned.
The Report Stays Queued or Generating
- Queued for minutes: the background session has not started yet. Choose Refresh. If it stays Queued, the session may have failed to start. Delete the report and use Generate again, or Generate and Open.
- Generating for a long time: large reports can take several minutes. While the run is in progress, the viewer shows a status page and the generation log is still empty; the log is written when the run ends. A run always ends: as Completed, or as Failed at the latest when Max. Tool Rounds is reached.
Scheduled Reports Do Not Appear
| Symptom | Cause | What to do |
|---|---|---|
| No reports at all | The job queue entry is still On Hold (that is how Schedule creates it). | Open the entry and choose Set Status to Ready. |
| Job queue entry in Error: AI report instruction … does not exist. | The instruction was deleted, or the parameter string was changed. | Point the entry's Parameter String at an existing instruction code, or delete the entry. Deleting an instruction normally deletes its entries. |
| Job queue entry in Error: The job queue entry has no parameter string… | An entry created by hand without the instruction code. | Enter the instruction code in Parameter String. |
| Job queue entry in Error: You do not have access to AI report instruction … | The entry runs as a user who is not on the instruction's permission list. | Add that user (the entry's User ID) to the instruction's list, at least as Read Only. |
| Reports appear, but with the wrong period | The formulas resolve against the run date. | Check the formulas against the run day, for example -1M-CM for "last month" when the job runs early in the month. See Worked examples. |
| Old reports disappear | Reports to Keep prunes older reports after every run. | Raise Reports to Keep, or set it to 0 to keep everything. |
The Numbers Look Wrong
Open the Generation Log and find the calls that produced the number. aireport_sqlquery shows the SQL; aireport_finreport shows the financial report and date filter.
| Symptom | Likely cause | Fix in the prompt |
|---|---|---|
| Revenue shows as negative, or costs as positive | G/L sign convention: credits are negative. | "Present revenue as positive." Better: name a financial report that defines the signs. |
| Revenue differs from your P&L | The agent chose different accounts or entries (value entries vs. G/L, including or excluding discounts). | Name the financial report: "Revenue from P&L-MGMT", or define it: "Revenue = G/L accounts 40000..49999". |
| Totals lower than expected | A result was cut at Max. SQL Rows per Query. The agent is told never to total a truncated list, but check the log for a "cut at N rows" note. | Ask for aggregated figures ("by month", "top 20"), or raise the row limit. |
| The wrong period | The agent used another date than the report period. | Check Period Start/End on the report. If they are right, say explicitly which date to filter on: "by posting date", "by due date". |
| Different figures from run to run | The agent made different choices each time. | Write down the choices in the prompt: tables, fields, filters, financial reports. The designer's write the instruction step does this for you. |
| A section says "no data" | The query found nothing, or the user running the report may not read that table or company. | Check the query in the log; check the running user's permissions. |
| A spreadsheet's figures do not match the sheet | The slicers were set differently. | Say which slicer to set to which value: "set the period slicer to the report period; leave the department slicer on ALL". |
Charts and Layout
| Symptom | Cause | What to do |
|---|---|---|
| A chart is missing | The agent rendered it but did not place it in the page. The page then holds an invisible placeholder. | Ask for it explicitly in the prompt, or in the designer: "put the revenue chart under the KPI tiles". |
| A chart has a different style | The agent drew it by hand instead of using the chart engine. | Add "use the chart tool for all charts". Hand-drawn SVG is flagged to the agent, but not refused. |
| The report looks different in the browser after download | Fonts on the other device differ. Reports use system fonts. | Nothing to fix for most reports. For a fixed look, name common fonts in the house style. |
| Printing cuts a table or chart | Page breaks fall inside a section. | Add "each section starts on a new page when printed" or "avoid page breaks inside tables". |
The Designer
| Message or symptom | What to do |
|---|---|
| The AI Report Designer is already open for instruction … in this session. | Close the other designer first. Each session holds one design draft. |
| A report is being generated in this session… | Wait for Generate and Open to finish. |
| Nothing has been designed yet… on Save as Report or Download | Ask the agent to build the report first. |
| The instruction has no prompt yet… on Generate Unattended | Ask the agent to write the instruction, or type a prompt on the card. |
| The agent says it cannot change the instruction | You have Read Only access. It shows the proposed prompt in the chat; an owner can paste it into the instruction. |
| The instruction card shows an error that another user changed the record | The agent rewrote the instruction while the card was open underneath. Close and reopen the card. |
| The chat pane is missing | The FactBox pane is hidden. Show it with the FactBox toggle in the page header. |
Getting Help
When you contact support, include:
- the report number and its Error Message,
- the Generation Log: open it, choose Print and save it as PDF,
- the provider and model (hidden Model column on AI Reports),
- the instruction's prompt and period formulas.
Remove sensitive figures before sending.