Passing HTML into the page


dbr.html - Pass HTML directly into the report
dbr.purehtml - Same as dbr.html, kept for compatibility
dbr.html: - Include HTML into a string
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


select 'dbr.html', 'HTML statement'
select 'dbr.purehtml', 'HTML statement'
select 'dbr.html:HTML statement'
select 'dbr.purehtml:HTML statement'
select 'dbr.javascript', 'javascript code' [, 'onload']
select 'dbr.css', 'css'
select 'dbr.head', html_tags
select 'dbr.file', path_to_file


By default, if you include HTML tags in the report, myDBR will escape those tags. With these commands, myDBR lets the browser render the selected HTML-code.

With the dbr.html-command you can allow the client browser to render the HTML. The dbr.html-command makes the whole result set to be passed directly to the browser, as with the dbr.html:-syntax this allows mixing HTML within the query. The dbr.html: allows HTML formatting inside the result table's cell.

You can also pass Javascript code with 'dbr.javascript'. The command is a short version of 'dbr.html' and adds script tags around the parameter. The optional 'onload'-parameter makes the script run after the DOM-tree has been loaded Adding your own CSS can be done with 'dbr.css' which works similarly.

This allows the report author to include any content in the report and also to affect the layout of the report.

Example - dbr.html

Putting a logo in the left top corner of the report. Embed Google Maps map and YouTube video side by side in a report.

select 'dbr.title', ''; /* We do not need the title */

/* Putting up the logo. We'll use a predefined left div */
select 'dbr.html', '<div class="left"><img src=""></div>'; 

/* Use this as title */
select 'dbr.hideheader';
select 'BMW F1 vs, BMW M5';

/* Put map and video side by side. 1st column */
select 'dbr.html', '<table align="center"><tr><td>'; 

select 'dbr.hideheader';
select 'Google map: Rockingham Race Track';

/* We have the Google Map URL here */
select 'dbr.html', RockinghamURL
from mydb.Racetracks;

/* 2nd column */
select 'dbr.html', '</td><td>'; 

select 'dbr.hideheader';
select 'Video: Fifth Gear';

/* We have the YouTube video URL here */
select 'dbr.html', F1vsM5URL
from mydb.Videos;

/* Close the table */
select 'dbr.html', '</td></tr></table>';

The report will position the logo on the top left. Map and video will appear side-by-side:

Example - 'dbr.html:'

The report will output a list of parts and their picture.

select 'Part 1' as 'Part name', 
       'WDC-2345-1' as 'Code', 
       'dbr.html:<img src="">' as 'Preview'
select 'Part 2', 
       'dbr.html:<img src="">'
select 'Part 3', 
       'dbr.html:<img src="">';

The report will output a normal myDBR report list. myDBR will just put the indicated picture in the third column's cell.

Example - 'dbr.head'

You can include your own tags into HTML HEAD section with dbr.head

select 'dbr.head', '<meta property="og:url" content="">';
select 'dbr.head', '<meta name="twitter:card" content="summary_large_image">';
select 'dbr.head', '<meta name="twitter:card" content="summary_small_image">';

'dbr.head' head with the OEM license

The OEM license allows for you to set dynamic title element

select 'dbr.head', concat('<title'>', thetitle, '</title'>');