Command reference

Aggregate Functions

dbr.sum - Calculates the sum of the selected column
dbr.min - Calculates the minimum value of the selected column
dbr.max - Calculates the maximum value of the selected column
dbr.count - Calculates the number of non-null values
dbr.countd - Calculates the distinct number of non-null values
dbr.avg - Calculates the average of selected column
dbr.sum.prefix - Set's the prefix to be used with dbr.sum
dbr.min.prefix - Set's the prefix to be used with dbr.min
dbr.max.prefix - Set's the prefix to be used with dbr.max
dbr.count.prefix - Set's the prefix to be used with dbr.count
dbr.countd.prefix - Set's the prefix to be used with dbr.countd
dbr.avg.prefix - Set's the prefix to be used with dbr.avg
dbr.summary.text - Adds text to summary row
dbr.calc - Allows you to create calculation formulas to populate cells
dbr.summary.calc - Same as dbr.calc. Kept for compatibility with older versions
dbr.summary.options - Change the default aggregate calculation

Titles / text

dbr.title - Set the report title. By default, the report's title is the report's name
dbr.subtitle - Give a name to the result set in a report
dbr.text - Insert a free text element to the report

Applying Styles

dbr.hidecolumns - Hide the number of columns at the end of the result set
dbr.hidecolumn - Hide individual columns which can be anywhere in the query
dbr.showcolumn - Show individual columns that were automatically hidden
dbr.rowstyle - Report row's CSS style. A column in the query contains the CSS style for the row
dbr.rowclass - Report row's CSS class. A column in the query contains the CSS-classname for the row
dbr.colstyle - Report column's style, where a style is a combination of printf formatting/CSS-style
dbr.colclass - Report column's CSS class. Adds a CSS-class to a specified column
dbr.cellstyle - Adds CSS-style to individual cells based on the style in another column. This allows value-based formatting
dbr.cellclass - Adds CSS-class to individual cells based on the style in another column. This allows value-based formatting
dbr.cellformat - Report cells' printf format. Format column with formatting from another column. Allows formatting cells differently in the same column in different rows
dbr.hideheader - Hide the headers in result set
dbr.headerstyle - Header's style
dbr.header.colstyle - Header columnm's style
dbr.summary.colstyle - Summary columnm's style
dbr.header.colclass - Header-column's CSS class
dbr.footerstyle - Footer's style
dbr.footer.colclass - Footer column's CSS class'
dbr.footer.colstyle - Footer's style for specific column
dbr.footer.cellclass - Set footer's CSS class based on data on another footer column
dbr.footer.cellstyle - Set footer's CSS style based on data on another footer column
dbr.resultclass - Add custom CSS class to the result table
dbr.html5data - Put a column to another column's data-xxx attribute instead of a column
dbr.sum_prefix - Override the default sum-prefix
dbr.min_prefix - Override the default min-prefix
dbr.max_prefix - Override the default max-prefix
dbr.avg_prefix - Override the default avg-prefix
dbr.count_prefix - Override the default count-prefix

Calendar

dbr.calendar - Create a calendar from a result set or dynamically via Ajax
dbr.calendar.report - Define the Ajax report for calendar data
dbr.calendar.options - Set calendar options

Cross-tabulation

dbr.crosstab - Turn a table report into a cross-tabulation report. The first parameter is the crosstable column, the optional second parameter marks the last data column inside a crosstable.
dbr.hsum - Calculate horizontal sum in a cross-tabulation report
dbr.hmin - Calculate horizontal minimum in a cross-tabulation report
dbr.hmax - Calculate horizontal maximum in a cross-tabulation report
dbr.hminus - Calculate horizontal value with formula Col1 - Col2 - Col3...
dbr.hnull - Creates a placeholder for a horizontal column used with dbr.calc
dbr.hcount - Calculate number of values horizontally in a cross-tabulation report
dbr.havg - Calculate horizontal average in a cross-tabulation report
dbr.hidecolumn.data - Allows hiding crosstable data columns, keep summary column. Used with dbr.calc
dbr.hidecolumn.set.data - Allows hiding crosstable data columns based on data CrossTabSet name
dbr.hidedatacolumn - Same as dbr.hidecolumn.data, kept for compatibility
dbr.hidecolumn.data.all - Hide all crosstable data columns, keep summary column.
dbr.hidecolumn.summary - Allows hiding crosstable summary columns, keeping data columns. Used with dbr.calc
dbr.crosstab.title - Redefine the default title for horizontal summary column
dbr.crosstab.order - Set the order of the cross-tabulation columns
dbr.crosstab.col - Predefine the cross-tabulation columns
dbr.crosstab.options - Add crosstab option
dbr.crosstab.col.title - Set column title for crosstab horizontal summary column
dbr.crosstab.col.style - Set columnstyle for crosstab horizontal summary column
dbr.crosstab.header - Add additional header group in crosstab
dbr.crosstab.header.col - Predefine the 2nd level cross-tabulation header columns defined in dbr.crosstab.header
dbr.crosstab.group - Group crosstable column values by adding another header level
dbr.crosstab.data.tooltip - Define a crosstab header tooltip based on the crosstab data value

Header levels

dbr.hdr - Set header level in a query
dbr.hdr.options - Do not hide repeating headers

Appearance

dbr.accordion - Organize report elements with accordions
dbr.accordion.close - Marks the end of an accordion
dbr.accordion.class - Define your own accordion-style with a class
dbr.accordion.style - Define your own accordion-style
dbr.columnfilter - Add a filter to a column. The filter hides non-matching rows
dbr.columnfilter.remember - Remember the user filter choise between page refreshes
dbr.column.filter - An alias for the dbr.columnfilter
dbr.columnhighlite - Add a filter to a column. The filter highlites matching rows
dbr.column.title - Define the title for a column in cases where the content of the column is dynamic
dbr.collapse - Collapse selected columns to make a more compact view
dbr.collapse.template - Use template for collapsed data
dbr.colsort - Alias for dbr.sortcol
dbr.compare - Show database results side by side
dbr.compare.options - Change compare behavior
dbr.divify - Use DIV's instead of tables in the output
dbr.header.group - Add additional header row to group columns
dbr.keepwithnext - Makes next element to be placed side by side with the current one
dbr.lockcolumns - Lock leftmost columns when resultset does not fit into the screen. The 'fixedrow' options allows variable height columns
dbr.no_data - Define a placeholder for queries that do not return any data
dbr.nosort - Disable sorting on specified columns
dbr.parameters.show - Make parameter input visible in the report
dbr.pageview - Show a row from the database in a page view
dbr.refresh - Make the report automatically refresh itself at a given interval or just once if no parameters are given
dbr.resultset.options - Allows combining multiple result sets by skipping header/footer
dbr.rownum - myDBR replaces the command with the row number in the result set
dbr.rownum.set - Initialize the rownum-value
dbr.search - Disable/enable search & export for a given result set
dbr.scrollable - Make result set scrollable with a fixed number of rows
dbr.sort - Set initial sorting order
dbr.sortcol - Sort a column-based value from another column
dbr.sortmethod - Override the default sort method
dbr.sortorder - Override the default initial sort order. The default is 'intelligent'
dbr.sort.remember - Remember the user's sort order
dbr.header.tooltip - Define tooltip for the header
dbr.toggle - Set columns/rows togglable
dbr.toggle.options - Set toggle options
dbr.tooltip - Define the cell's tooltip
dbr.pager - Attach the pager component to a table report
dbr.tab - Organize report elements with tabs
dbr.tab.class - Define your own tab style with class
dbr.tab.close - Mark the tab element as closed
dbr.tab.next - Switch to the next unpopulated tab
dbr.tab.selected - Set's the default tab by name or by tab order number (0=first, 1=second)
dbr.tab.style - Define your own tab style
dbr.localization - Override the default localization

Charts

dbr.chart - Create a chart from the following result set
dbr.chart.options - Assign special options for the chart
dbr.chart.color - Define own colors
dbr.chart.gv.option - Specify GraphViz chart options
dbr.chart.gv.style - Defines the default style for the object
dbr.chart.gv.node - Defines the individual node style
dbr.chart.gv.cluster - Defines the individual cluster style
dbr.chart.gv.engine - Selects the layout engine
dbr.chart.gv.renderer_formatter - Selects the renderer and optional formatter for the engine overriding the default ones, for example cairo:cairo
dbr.chart.gv.preprocess - Preprocess the gv file
dbr.chart.gv.cmdoptions - Pass options to renderer command

Linked reports

dbr.report - Create a link to another report
dbr.url - Create a link to an external URL
dbr.button - Create a button containing a link
dbr.list - Create a list containing a link to a report
dbr.embed_object - Create a placeholder or a popup window for the linked report's content
dbr.selectlist - Create a select list for linked reports
dbr.searchable - Create a search field to get dynamic content

Editable reports

dbr.editable - Prepares a column so it is in-place editable
dbr.upload - Upload a file to the server's filesystem
dbr.upload.options - Set an upload option
dbr.selectable - Convert an ID column to a selectable row to be used with a report linked button
dbr.selectable.selected - Preselect selectable rows by passing the ID value as a parameter

Passing HTML Into the Page

dbr.html - Pass HTML directly into the report. Use this for safe HTML (your own HTML)
dbr.html.ext - Pass HTML directly into the report. HTML content will be filtered for unsafe code. Use this for usafe HTML.
dbr.purehtml - Same as dbr.html, kept for compatibility
dbr.html: - Include HTML into a string. Use this for safe HTML (your own HTML)
dbr.html.ext: - Include HTML into a string. HTML content will be filtered for unsafe code. Use this for unsafe HTML
dbr.purehtml: - Same as dbr.html:, kept for compatibility
dbr.javascript - Include Javascript code in the report
dbr.css - Include CSS definitions in the report
dbr.head - Include tags into HTML head part
dbr.file - Include a HTML file into the report
dbr.redirect - Do a server side 302 redirect to another page. Uses the same syntax as dbr.report
dbr.http.get - Make a HTTP GET requests and optionally return the result
dbr.http.delete - Make a HTTP DELETE requests and optionally return the result
dbr.http.post - Make a HTTP POST requests and return the result
dbr.http.put - Make a HTTP PUT requests and return the result
dbr.http.save - Call a procedure to handle a HTTP POST/GET result
dbr.http.option - Pass options to dbr.http.post
dbr.http.header - Save HTTP headers
dbr.http.debug - Debug HTTP PUT/POST call

Templates

dbr.template - Defines a template being used for the subsequent result set
dbr.template.header - Declares the header's result set
dbr.template.footer - Declares the footer's result set
dbr.template.form - Use result set columnns to set values for form fields in template
dbr.record - Record report output into a record variable be used later

Running total

dbr.running_total - Calculate running total for a column

File downlaods

dbr.download - Serve file(s) from the filesystem

Import commands

dbr.import.prepare - Before the import is done, this preparation report is run
dbr.import.finish - After the import is finished, this report is run
dbr.import - This procedure is called for each imported row
dbr.import.options - Set import options

Export Commands

dbr.export.options - Set export option
dbr.wkhtmltopdf - Pass command line parameters to wkhtmltopdf command
dbr.calc.excel - Define an Excel native formula for a column
dbr.blob - Read file from the database
dbr.export.json - Keeps the JSON formatted column as JSON in JSON export

Remote Calls to Other myDBR Servers

dbr.remote.prepare - Defines the server to be called, call to be made and local table to receive the results. Required, needs to be called before 'dbr.remote.call'
dbr.remote.call - Executes the defined remote call and runs a local report to handle the results. Required.
dbr.remote.options - Allows setting extra options for transfer. The option includes turning off the certificate check on the remote server. Optional and needs to be called before 'dbr.remote.prepare'.

Google Maps Extension

dbr.googlemaps - Display Google Maps mashup
dbr.googlemaps.heatmap - Use Google Maps Heatmap layer
dbr.googlemaps.link_in_title - Whether to show single linked report in the title or in the marker
dbr.googlemaps.polyline - Draw a polyline between the points
dbr.googlemaps.route - Draw route between the points
dbr.googlemaps.kml - Include KML-file into the maps
dbr.googlemaps.geojson - Include GeoJSON-file into the maps
dbr.googlemaps.marker - Add additional markers to map
dbr.googlemaps.same - Use the previous map and add elements to it instead of creating a new one

OpenStreetMap Extension

dbr.openstreetmap - Show map
dbr.openstreetmap.options - Additional options to the Leaflet.js L.Map
dbr.openstreetmap.heatmap - Use heat layer
dbr.openstreetmap.tiles - Use alternative tiles on top of a map
dbr.openstreetmap.geojson - Include GeoJSON-file into the maps
dbr.openstreetmap.polygon - Add polygons to the map

Mail Extension

dbr.mail - Send mail
dbr.mail.sender - Provide sender address in the report instead of using the one from the settings (user/extension_init.php)
dbr.mail.recipient - Add multiple recipients to the mail to be sent
dbr.mail.attach - Add attachment to mail
dbr.mail.notify_successful_mail - Disable the "Mail sent" message
dbr.mail.smtp.user - Use alternate SMTP user/password
dbr.mail.smtp.server - Use alternate SMTP server
dbr.mail.smtp.authentication.type - Select SMTP authentication (default LOGIN)
dbr.mail.encoding - Set the mail encoding ("8bit", "7bit", "binary", "base64" and "quoted-printable")
dbr.mail.debug - Set debug on to get verbose error messages (1=debug on,0=debug off)
dbr.mail.log.proc - Define a procedure which will log the mail actions.
dbr.mail.nobr.html - Do no convert linefeeds to line breaks in HTML mail
dbr.mail.header_file - Override the default mail header file with your own. The file location is based on user/
dbr.mail.postprocess - Postprocess the mail output with a command line tool (default pandoc)
dbr.mail.ignore_invalid_email - Ignore invalid email addresses used in dbr.mail.recipient
dbr.mail.smtp.ssl - Define the SSL context options for the connection

Push Notification Extension

dbr.push - Send a push message
dbr.push.sender - Choose another sender than the one defined in $mydbr_push init
dbr.push.option - Set a service-specific option
dbr.push.notify_successful_push - Disable the "Push message sent" message
dbr.push.log.proc - Log the push message activity to database
dbr.push.debug - Show status for each message sent

eChart Extension

dbr.echart - Create an extended chart
dbr.echart.color - Select colors for the chart
dbr.echart.name - Select category names
dbr.echart.bubble_scale - Scale bubble chart axis

d3 Extension

dbr.d3 - Create a d3 object
dbr.d3.sankey_format - Format the Sankey tooltips
dbr.d3.zoom - Zoom the chord diagram when data has long texts

SMS Extension

dbr.sms - Send SMS

Organization Chart Extension

dbr.org.chart - Display organization chart
dbr.org.chart.nodeclass - Add CSS class to HTML format organization node
dbr.org.chart.nodesize - Set node sizes
dbr.org.chart.nodewidth - Set node width for individual node
dbr.org.chart.nodehspace - Horizontal space in between the boxes. Default is 30px
dbr.org.chart.nodevspace - Vertical space in between the boxes. Default is 30px
dbr.org.chart.nodehshift - The number of pixels siblings are shifted horizontally (global for all boxes). Default is 15px
dbr.org.chart.nodeheight - Set node height for individual node
dbr.org.chart.autobalance - Define 'a'-node positioning
dbr.org.chart.animate - Disable chart animation
dbr.org.chart.lineclass - Set CSS-class for the line ending to the node
dbr.org.chart.toggle - Set ability to toggle sub-charts on/off with the option of saving the status to database
dbr.org.chart.nodetoggle - Defined node's initial toggle state 1=toggled, 0=open
dbr.org.chart.tooltip - Add a tooltip to the node
dbr.org.chart.move - Allow reorganization by moving subtrees around
dbr.org.chart.drop - Allow dropping nodes on top of each other
dbr.org.target - Add a target to the node

Barcode Extension

dbr.barcode - Show the barcode

QR Code Extension

dbr.qrcode - Show the QR code

ip2location Extension

dbr.ip2location - Get IP location
dbr.ip2location.language - Maxmind can return names in different languages. If you wish to use other than English (code = 'en'), see supported languages from MaxMind

Form Extension

dbr.form - Create a form

iCalendar Extension

dbr.icalendar - Create iCalendar file