SSRS2

v2.0.0-rc.2
io.github.AntoineGou/ssrs2 Checked 1 day ago Published 4 days ago

Markdown to editable PowerPoint, Word, PDF; checks, edits and previews RDLC/RDL reports.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

convert_report Convert a report to a file

Converts a report (RDL or RDLC) or Markdown (a document, or slides) with SSRS2 (Report Viewer's rules) to pptx (PowerPoint's own text boxes, tables and pictures, a slide per page: a Markdown deck becomes a deck), pdf, docx, xlsx, mhtml, tiff, png (the first page), csv or xml. It is checked first, as validate_report checks it: with errors nothing is written. Returns validate_report's answer and written: the file's name and size, url (downloaded once, within ten minutes), curl (the command that saves it), and what it holds read back as PowerPoint (slides) or Word and a PDF reader (document) get…

ParameterTypeDescription
culturestring | nullThe culture of a report that names no Language (en-US, de-CH); left out, en-US.
formatstring | nullpptx (default), pdf, docx, xlsx, mhtml, tiff, png, csv or xml.
helptrue, or topics (["markdown", "decks"]): the reference only.
markdownstring | nullMarkdown's text: a document, or slides with marp: true. Give rdlc or markdown.
namestring | nullThe file's name, without its extension (default: the Markdown's title, else report).
parametersobject | nullReport parameter values by name (a multi-value one's separated by commas).
picturesobject | nullThe pictures the Markdown names, by its paths: {"images/chart.png": "<base64>"}; 5 MB each, 20 MB in all.
rdlcstring | nullThe report definition's XML (RDL or RDLC). Give rdlc or markdown.
sampleDataRows per dataset: {"DataSet": [{"Field": value}]}, dates as ISO text. Left out, made up from the fields' types.

compare_reports Group reports by structure

Groups report definitions (RDL or RDLC) by structure, to plan one change across many: a group's reports have the same items, datasets, parameters and code modules and differ only in places, texts and looks, so one set of operations naming their items changes them alike. Returns groups, the largest first: structure (edit_report's structure), roles (what role:signature and the like name there), differs (how its first report differs from the first group's), places (items placed otherwise), and versions: each report and its version.

ParameterTypeDescription
reports *objectThe reports by name: {"Receipt_de-CH.rdlc": "<the report's XML>", ...}; 50 at most, 20 MB in all.
detailstring | null"full": each group's reports listed too, beside their versions.

render_preview Render a report's pages

Renders a report definition (RDL or RDLC) or Markdown (a document, or slides: a page each) with SSRS2, the Report Viewer engine, and returns its pages as PNG, as a PDF of it would show them: a JSON summary first (what validate_report answers, no need to validate first; madeUpRows; conversion for Markdown, what it approximated at its lines; text, what the pages print, page by page in reading order, where values are read exactly), then an image per page, or one image of numbered thumbnails (sheet) to see a deck or a long report whole. A report with errors is not rendered. help: ["answers"] says…

ParameterTypeDescription
culturestring | nullThe culture of a report that names no Language (en-US, de-CH); left out, en-US.
dpiintegerThe images' dots per inch, 48 to 200 (default 96: an A4 page is 794 x 1123 pixels).
firstPageintegerThe first page to return (default 1).
helptrue, or topics (["markdown", "decks"]): the reference only.
madeUpRows"all": every made-up row in the answer, not a summary.
markdownstring | nullMarkdown's text: a document, or slides with marp: true. Give rdlc or markdown.
pagesinteger | nullPages to return: 3 by default, 10 at most; with sheet, 30.
parametersobject | nullReport parameter values by name (a multi-value one's separated by commas).
picturesobject | nullThe pictures the Markdown names, by its paths: {"images/chart.png": "<base64>"}; 5 MB each, 20 MB in all.
rdlcstring | nullThe report definition's XML (RDL or RDLC). Give rdlc or markdown.
sampleDataRows per dataset: {"DataSet": [{"Field": value}]}, dates as ISO text. Left out, made up from the fields' types.
sheetbooleanOne image of up to 30 pages as numbered thumbnails, too small to read: look at a page itself for that.

describe_report Outline a report

Outlines a report definition (RDL or RDLC) to plan a change: its page, datasets and fields, parameters, and every item top to bottom with its kind, place and size in cm, what it shows and does (hidden, toggled, page breaks), and its role (title, table, totals, declaration, signature...), which role:signature and the like name in edit_report and validate_report whatever the report calls the item. Returns version (edit_report's baseVersion) and outline; with item, that part's XML as written, with its lines (to copy an edit's find from).

ParameterTypeDescription
rdlc *stringThe report definition's XML (RDL or RDLC).
detailstring | null"full": every text whole and why each role was guessed.
itemstring | nullOne part in full: a name, a role (role:signature) or a path (WorkInstructions/TablixRow[3]): its outline and XML.
partintegerOutline part, from 1.

edit_report Change a report

Changes a report definition (RDL, RDLC) given as its XML by operations (the SSRS2 designer's own), all or none. The text is patched (the rest as it was), then checked: its new problems and pages said. The answer's rdlc is the changed report (past 200 KB, url and curl: a download within ten minutes). Operations ("op"): dataset, parameter, page, header, footer, code, textbox, table, matrix, list, chart, gauge, indicator, databar, sparkline, image, barcode, qrbill, subreport, line, rectangle, set, remove, space, move, swap, copy, field, column, remove_column, row, total, group, sort, widths, filt…

ParameterTypeDescription
baseVersionstring | nulldescribe_report's version.
checkbooleanCheck after (default true).
detailstring | null"full": every item, the diff whole.
dryRunbooleanThe diff, not the report.
editsOr exact replacements: [{find, replace, in?, all?}].
fitbooleanWith keepPages: a block that costs rows is written in the form checked to keep them.
helpOperations' names, or true.
keepPagesbooleanRefuse a change that would print more pages, or at fewer table rows (variants, rowCounts too).
maxPagesinteger | nullRefuse a report printing more pages.
operationsarray | nullThe operations, in order.
parametersobject | nullParameter values.
picturesobject | nullPictures an image names by its file: {"path": "<base64>"}.
rdlcstring | nullThe report's XML.
rewritebooleanWrite anew a report that cannot be patched.
rowCountsAs validate_report's: {DataSet: "1..30"}.
sampleDataRows: {DataSet: [{Field: value}]}.
summarystring | nullSaid back.
variantsAs validate_report's; their pages said.

validate_report Validate a report

Checks a report definition (RDL or RDLC) or Markdown with SSRS2's engine (Report Viewer's rules): XML, schema, every expression compiled, then a run with rows through every page. Returns ok, a summary and diagnostics (code, severity, item, property, expression, line, message, hint); atRunTime counts what failed as it ran (#Error cells). Call it after each change until ok is true and atRunTime absent. Expressions are Visual Basic and may only compute (restrictedCode). Also layout, expect, variants, rowCounts and the report as it was (baselineRdlc): help: ["checks"].

ParameterTypeDescription
baselineRdlcstring | nullThe report as it was (its XML): only new warnings are said, with pages before.
culturestring | nullThe culture of a report that names no Language (en-US, de-CH); left out, en-US.
expectRules: {"order": ["role:table", "Block?", "role:signature"]}, samePage, page, pages, maxPages, noOverlap. An item named and not printed fails its rule, unless written Name? (a variant may hide it).
helptrue, or topics (["markdown", "decks"]): the reference only.
layouttrue, or names and roles (role:signature): where each item printed, its page and place in cm.
madeUpRows"all": every made-up row in the answer, not a summary.
markdownstring | nullMarkdown's text: a document, or slides with marp: true. Give rdlc or markdown.
parametersobject | nullReport parameter values by name (a multi-value one's separated by commas).
picturesobject | nullThe pictures the Markdown names, by its paths: {"images/chart.png": "<base64>"}; 5 MB each, 20 MB in all.
rdlcstring | nullThe report definition's XML (RDL or RDLC). Give rdlc or markdown.
renderbooleanfalse: the definition only, no expression runs.
rowCounts{"Requests": "1..30"}: the pages of each count and the first that adds a page.
sampleDataRows per dataset: {"DataSet": [{"Field": value}]}, dates as ISO text. Left out, made up from the fields' types.
variantsRenders again with rows changed: [{"name": "no deposit", "sampleData": {"Deposit": null}}].