In the second post of this series I showed how you could use XML functions to return your recordset from the database as HTML
row and cell elements (“Make the Database Return Your Recordset as an HTML Table — Using XML”, 8/6/2016). We did this by naming the XML elements after the appropriate HTML elements.
If we stopped at this point, we could create a SmartObject that returns our string of HTML
data to the caller. For example, we can already have the HTML for the rest of the report elsewhere, and this SmartObject simply “plugs in” the data to be displayed. This could be as easy as concatenating strings (say, an HTML report header, the HTML
output from the SmartObject, and an HTML report footer) in a Data Event.
We can go further. By using XSL Transform, we should be able to have the database return our entire HTML report — not just the table.