Run one of the shop's own reports from our service
The customer asks: Our service runs one of the shop's reports, with filters, and reads the rows
- Verdict: Ready, with limits (4)
- Door: Outside app · area: Reports and data › Reports and BI
- Recipe: Recipe: reading the shop's own reports
- Sample: none yet
- Checked: run on a sandbox 2026-10-21 · POS 2.0.0.658 · run_report on a report (59 rows); a prepared report answered nothing before a run, then prepare_report queued a run, and run_report read it by its filters and by its record name (60 rows); both runs deleted; not run: a caller naming another user, a user with fewer rights (the product's tests)
What you build
From POS build 2.0.0.654, your service calls /api/method/ivendnext_mpos.api.v1.run_report with the report's name and its filters, as Desk runs it, and reads the columns and rows. A report the shop prepares in the background is queued with prepare_report and read when its run is done (recipes/shop_reports.md).
Limits
- A prepared report is never started by
run_report: it answers the last finished run for those filters, or nothing. Queue a run once, then poll it. run_reportreads as the user the call names (user), not only as your service's user, and a named run is read whole by its record name. Never pass a user or a run name the shop did not choose.prepare_reportchecks no right: any signed-in user may queue any report, and reads its output filtered only by their own User Permissions.- What a report shows depends on the key's user: a branch user's stock reports are fenced by some reports, not all (the card branch-sees-own-stock).
Tell the customer
Our service reads your own reports as the user you give it, and as any user a call names; a background run named by its record is read whole, whoever made it; and any signed-in user may queue a background report and read its output. Give our user only the reports and stores it needs.
What next
- Tell the customer the 4 limits above, and write them into the proposal.
- Follow the recipe: Recipe: reading the shop's own reports.
- Build and test it on your sandbox (request one if you have none; what is on it).
- Run the checks: your own tests, the kit's checks and the money kit's release gate (testing and release).
- Release through the customer's own release gate (14. Testing and release); an app other shops install goes through the App library.
Stop your service for a while and start it again: it must catch up from the event feed, missing nothing.
Related needs
- A branch sees the stock of its own store and the head office's, no other — Ready, with limits (6)
- Head-office reports and our BI tool fed with sales and stock — Ready, with limits (3)
- A statement of what each customer owes, printed and sent on a schedule — Ready, with limits (3)
Start a project shortlist with this need · Put it in your blueprint · Every need