dbDBKraftDocs
Documentation/Development modules
Chapter 22

Reports

A catalogue of ready-made and custom queries, with parameters, exports and printable document templates.

#22.1The report list

The left column groups reports by category; click a category header to collapse or expand it (collapsed state is remembered). Built-in reports carry a System badge and cannot be edited or deleted — but they can be duplicated into editable copies.

The built-in catalogue:

CategoryReports
DBAInitialization Parameters · NLS Database Parameters · Role Privileges · Roles · Rollback Segments · Server Components · System Privileges · Tablespaces · Total Free Space · Users
ObjectsAll Tables · All Views · All Indexes · All Sequences · All Synonyms · All Triggers · Constraints · Invalid Objects · Index Status
PL SQLProcedures · Functions · Packages · Package Bodies · Types · Invalid PL/SQL Objects · Compilation Errors
User (no DBA privileges needed)My Tables · My Objects · My Indexes · My Sequences · My Role Privileges · My System Privileges · My Tablespace Quotas · My Sessions
StorageTablespace Usage
PerformanceTop SQL by CPU
SecurityLock Waits
SchedulingScheduler Jobs

The User category is the one to start with if your account has no DBA role — those reports read USER_* views and always work.

#22.2Running a report

Select a report and press Run Report. Its SQL is shown read-only above the results; the results table below shows the row count and elapsed time. Errors appear in a red monospaced block instead.

#22.3Parameters (bind variables)

A report whose SQL contains :name bind variables gets a Parameters bar above the SQL, with an input box per variable. Fill them in and run.

DBKraft detects binds intelligently: it ignores := assignments, string literals and comments, so PL/SQL in a report body will not produce spurious parameters. Values that look numeric are substituted as numbers; everything else is quoted and escaped.

#22.4Exporting

The Export menu (enabled once a report has produced rows) offers CSV, Excel, JSON and HTML. Excel is generated server-side so the complete result set is exported.

#22.5Generating a formatted document

Generate renders your results into an HTML document you can save or print (and therefore save as PDF).

The dialog first offers Branding:

ControlEffect
Theme colourA colour picker plus a hex box. Invalid hex values are flagged.
Company logoUpload an image (under 1 MB). A preview appears; the × removes it.
Logo positionTop left or top right.

Branding applies to the two built-in templates, Classic Corporate (accent colour, company logo, striped rows, print-ready) and Minimal Document (serif document with accent, logo, and the report SQL printed).

Each template row then offers:

  • HTML — downloads the rendered document.
  • Print — opens it in a new window and triggers the print dialog. Choose "Save as PDF" there for a PDF.

#22.6Managing templates

The 🗎 button at the top of the report list opens Report Templates. Built-in templates can be previewed and copied; your own can be edited and deleted.

A template is plain HTML with placeholders:

PlaceholderSubstituted with
{{title}}The report name
{{category}}The report category
{{date}}Current date and time
{{user}}The connected username
{{connection}}host:port/service
{{sql}}The report’s SQL
{{rowCount}}Number of rows
{{table}}The full results table as HTML
{{themeColor}}The branding colour
{{logo}}The branding logo block

Preview renders the template with your current results, or with sample data if you have not run the report yet. All substituted values except {{table}} and {{logo}} are HTML-escaped, so data cannot break your layout.

#22.7Creating a custom report

+ at the top of the report list. Provide a Report Name, a Category (type a new one to create it) and the SQL Query. Use :name binds to prompt for values at run time. Save Report.

Existing custom reports can be Edited, Duplicated or deleted (the bin icon appears on hover). Duplicating a built-in report is the standard way to tweak one: the copy lands in the Custom category and is fully editable.