Advanced Spreadsheets and Reporting Documentation
Index

Instructions & Prompts

An instruction is the reusable recipe behind an AI report. It holds a prompt, which says what to report on, and three date formulas, which say which period. Every run of the instruction resolves the formulas again, so the same instruction yields "this month" in October and "this month" in November.

The Instructions List

Open AI Report Instructions (search, or the app's menu page). The list shows the instructions you may see. Instructions restricted to other users are not listed, except for SUPER users; see Permissions.

Column Meaning
Code, Description Identifier and name. Click the code to open the card.
Period Start / Term / Comparison Period Date Formula The three formulas (see Period Formulas).
Period (today), Comparison (today) The dates the formulas resolve to for your current work date. A formula that does not resolve shows its error here.
Last Generated At, Last Status When the last report was produced and how that run ended.
Reports How many reports exist for the instruction. Click to open them.
Scheduled Jobs How many job queue entries run the instruction.
Action What it does
New Opens a blank instruction card.
Edit Opens the selected instruction's card.
Generate Starts a run in the background. See Generating & Scheduling.
Generate and Open Runs now with a progress dialog, then opens the report.
Interactive Designer Agent Opens the designer for the instruction.
Reports The reports generated from the instruction.
Permissions Who may use the instruction (owners only).
Schedule Creates a recurring job queue entry for the instruction.
Refresh Reloads the list and the latest status.
Setup, AI Provider Open AI Report Setup and the AI providers.

Creating an Instruction

  1. Choose New on the instructions list.
  2. Enter a Code (up to 20 characters; it cannot be changed later) and a Description (up to 100 characters).
  3. Set the period formulas.
  4. Write the prompt in the Prompt editor.
  5. Close the card. You become the instruction's owner automatically.

Instruction card fields:

Field Meaning
Code Unique identifier. An instruction cannot be renamed; create a new one instead.
Description What the report is about. It is shown to the AI, and with the period it forms the default report title (Monthly sales (2026-10-01..2026-10-31)) until the agent names the report itself.
Reports to Keep After each run, only this many finished reports (Completed or Failed) are kept for the instruction. Older ones are deleted. 0 keeps every report. New instructions start with Default Reports to Keep from the setup.
Created By The user who created the instruction.
Period Start Date Formula, Period Term Date Formula, Comparison Period Date Formula See Period Formulas.
Period (today), Comparison (today) Live preview of the dates, updated as you type a formula.
Prompt A large, resizable text editor with a character count. The text is saved as you type and when you leave the editor.
Last Generated At, Last Status, Reports, Scheduled Jobs History, as on the list.

The card actions are Generate, Generate and Open, Interactive Designer Agent and Permissions.

Only owners can edit an instruction. A user with Read Only access sees the card, including the prompt, as read-only, and can still generate reports and open the designer.

Deleting an instruction (owners and SUPER users) also deletes every report generated from it, all permission lists, and the job queue entries that run it.

Period Formulas

The three formulas are standard Business Central date formulas.

Formula Applied to Gives
Period Start Date Formula The work date of the run The first day of the report period
Period Term Date Formula The period start The period's length. The period ends the day before the formula lands, so -CM with 1M is exactly the current month.
Comparison Period Date Formula The period start The first day of the comparison period, which has the same term

All three are optional:

  • No start formula: the instruction has no period. The agent reports on the current state, such as balances, open items or master data, unless the prompt names a period itself.
  • A start without a term: the period is a single day.
  • No comparison formula: there is no comparison period. The agent compares only if the prompt asks for it.
  • A term that does not move forward (0D, or a negative formula) is an error: The term … ends before the period starts.

Worked examples

Resolved for a work date of Sunday 18 October 2026:

Report on Start Term Compare Period Comparison
The current month vs. the same month last year -CM 1M -1Y 2026-10-01..2026-10-31 2025-10-01..2025-10-31
Last month vs. the month before -1M-CM 1M -1M 2026-09-01..2026-09-30 2026-08-01..2026-08-31
The current quarter vs. the same quarter last year -CQ 1Q -1Y 2026-10-01..2026-12-31 2025-10-01..2025-12-31
Last quarter vs. the quarter before -1Q-CQ 1Q -1Q 2026-07-01..2026-09-30 2026-04-01..2026-06-30
The current calendar year vs. last year -CY 1Y -1Y 2026-01-01..2026-12-31 2025-01-01..2025-12-31
Last calendar year -1Y-CY 1Y 2025-01-01..2025-12-31
The current week (Monday to Sunday) -CW 1W -1W 2026-10-12..2026-10-18 2026-10-05..2026-10-11
The trailing 12 complete months -12M-CM 12M 2025-10-01..2026-09-30
Yesterday -1D 2026-10-17
The current state (balances, open items) none none

Which work date is used:

  • Generate and Open and the designer use your session's work date.
  • Background, unattended and scheduled runs start a new session, where the work date is the current date.

The Period (today) preview uses your work date, so set the work date to try a formula for another day.

Year to date, month to date and fiscal years

The period always has a fixed length, so a period that ends today cannot be expressed as a term:

  • Month to date: use the current month (-CM, 1M) and say "month to date" in the prompt. There are no postings after today, so the figures are month-to-date anyway.
  • Year to date next to a monthly period: keep the monthly period and ask in the prompt for "year to date from the start of the fiscal year to the end of the report period". The agent knows the Accounting Period table and uses it when the fiscal year does not start in January.
  • Fiscal periods that differ from calendar months: the formulas are calendar-based. Describe the fiscal period in the prompt, or name a financial report whose column definition already handles it.

Writing the Prompt

The prompt is plain language. The app already adds the following, so do not repeat it:

  • the company name and Business Central company,
  • the local currency,
  • today's date and the work date,
  • the resolved report and comparison periods, with their filter forms,
  • the instruction code and description,
  • the house style from AI Report Setup.

The agent also knows the common Business Central tables and their sign conventions. For example, it knows that revenue credits are negative in G/L entries and that only posting accounts should be summed.

The agent builds a standard structure unless the prompt or house style says otherwise:

  • a header with title, company, periods and generation date,
  • a short executive summary,
  • a row of KPI tiles,
  • sections with tables and charts,
  • a Notes and data sources section.

A good prompt says:

Element Example
Purpose and audience "Monthly report for the management team." "One page the board can read in two minutes."
The figures, with definitions where they are not obvious "Revenue = income statement accounts in category Income. Gross margin = revenue minus cost of goods sold."
The data source when one exists "Use the financial report P&L-MGMT." "Use the SALES-DASH spreadsheet, set its period slicer to the report period."
Breakdowns "by salesperson", "by item category", "top 10 customers", "by department (global dimension 1)"
Comparisons "versus the comparison period, amount and % change"; "versus budget 2026 (G/L budget)"
Graphics "a column chart of monthly revenue for the trailing 12 months", "a waterfall from last year's to this year's operating result", "the income statement as a sankey flow", "an org chart of our companies as a diagram"
Formats and wording "amounts in thousands", "call it net revenue" (if not in the house style)
Caveats to state "say clearly if any customer has no salesperson assigned"

Tips:

  • Name financial reports and spreadsheets. When the organisation has already defined a figure, the agent runs that definition instead of rebuilding it from G/L entries. The result carries your own account grouping and sign conventions.
  • Give spreadsheets page regions. The agent then reads the presentable area of a sheet, not its helper columns.
  • Write the language you want. The report is written in the language of the instruction (or as the house style says).
  • Use the generation log. After the first runs, read the Generation Log to see which tables, fields and filters the agent chose, and add them to the prompt to make later runs consistent.
  • Let the designer write it. The Interactive Designer produces a detailed prompt, with exact tables, filters and formats, from a session in which you shaped the report.

Example prompts

Monthly management report (-CM, 1M, -1Y)

Monthly management report for the management team. Revenue, gross margin and operating result versus the comparison period, as KPI tiles and in a table with amount and % change; use the financial report P&L-MGMT for these figures. Top 10 customers by revenue with change. Open receivables by age bucket (current, 1–30, 31–60, 61–90, over 90 days past due). One column chart of monthly revenue for the trailing twelve months. Close with three bullet points on what changed most.

Receivables and collections (no formulas: current state)

Collections report for the credit controller. Total open receivables and overdue amount as KPI tiles. Ageing by due date in buckets current, 1–30, 31–60, 61–90, over 90 days as a stacked bar chart. The 15 customers with the largest overdue amount with balance, overdue amount, oldest due date and credit limit. Flag customers over their credit limit in red.

Sales by item category and salesperson (-1M-CM, 1M, -1M)

Sales report for last month for the sales managers. Revenue and gross margin by item category and by salesperson, from value entries, versus the comparison month. A bar chart of revenue by salesperson. The 10 items with the largest revenue increase and the 10 with the largest decrease. State the number of invoices and the average invoice value.

Where the money went (-CQ, 1Q, -1Y)

Quarterly income statement as a flow: a sankey from the revenue lines through revenue, cost of goods sold and gross profit to the operating expense lines, operating income, tax and net income. Colour costs red and results green. Under it the same figures in a table with the comparison quarter.

Group structure and close calendar (no formulas)

One-page overview for new finance staff. Our group structure as a diagram with the parent at the top: CRONUS Holding owns CRONUS US (100%) and CRONUS Canada (80%). Then the month-end close as a gantt chart with these steps, owners and working days: … Keep the text short.