Generates SQL for dbo.ReportDefinition — runs as preview
(@commit = 0) first.
Subreports are discovered and cloned automatically from
dbo.ReportDefinitionSubReportDefinition — no need to list them.
The script renames the parent to the new title, rewrites Avionte → CUO,
normalizes stored-procedure names to CUO_…, and recreates the
parent↔subreport links. Run with @commit = 0 to preview, then
@commit = 1 to apply.
Paste XML/SP by hand, or browse a report folder to auto-fill the
title, XML and stored procedure for the parent and every subreport. Both fields are
resizable — drag the corner to expand for copy/paste. Layout: parent
.xml/.rdl at the root, child reports under a
subreports/ folder, SP names as files under an sp/ folder.
Builds SQL for dbo.ReportDefinition. Every script runs as a
preview first (@commit = 0 inserts inside a transaction,
shows the stored rows, then ROLLBACKs). Set @commit = 1 to actually persist.
You're working with a Paycheck (or any non-Invoice) category — reports are created with their subreports, and the parent↔subreport junction links are inserted.
You're working with the Invoice category —
reports are parent-only: the subreport section is hidden and
no ReportDefinitionSubReportDefinition link is inserted.
ReportDefinitionSubReportDefinition
link is inserted. Switch via the Category control at the top of the page.Avionte → CUO, SPs normalized to CUO_…, and parent↔sub
links recreated.Only the single parent report is cloned and
renamed (Avionte → CUO, SP normalized to CUO_…) — no subreports
and no junction links.
New rows get DateModified = GETDATE(). Set @generateSP = 1
(default 0) in the generated script to also script out & (re)create the
renamed CUO_ stored procedures from the source ones.Browsing auto-fills the same fields you'd paste into:
<ReportFolder>/
Parent.xml / .rdl ← parent report (root-level)
subreports/ ← each child report (any subfolder)
ChildA.xml
sp/ ← stored procedures (filename = SP name)
CUO_exp_Foo.sql
<ReportFolder>/
Parent.xml / .rdl ← parent report (root-level)
sp/ ← stored procedure (filename = SP name)
CUO_exp_Foo.sql
(no subreports/ folder — Invoice is parent-only)
The parent is the file named/pathed parent, else the shallowest XML.
SP for each report is guessed by best name match (else the SP named in the XML); always editable.
A Files detected table shows how each file was classified.
ReportDefinition INSERT (preview/commit) for the parent + subreports for the parent only.@commit = 0 to preview.@commit = 1 and re-run to persist.@commit = 1 and re-run to persist.