๐ Expand All Report Rows โ
To automatically expand all rows in a report, put this HTML into static content blockโs Source:
Technically, this script is HTML, but most of the contents is CSS between the <style></style>
tags.
<style type="text/css">
table.table>tbody>tr.hidden {
display: table-row !important;
}
</style>
 
โ What if I only want to expand rows in emailed reports? Use this code instead:
<script>
// Insert CSS to expand rows if UserAgent contains "HeadlessChrome"
if (navigator.userAgent.indexOf("HeadlessChrome") > -1) {
ย ย var css = document.createElement("style");
ย ย css.innerHTML = "table.table>tbody>tr.hidden { display: table-row !important;}";
ย ย document.body.appendChild(css);
}
</script>
This script checks to see what browser is reading the page before deciding to modify the styling. It specifically looks for HeadlessChrome, is a special robotic browser Slate uses to generate report PDF's.
No Comments