SeekTable is a web-based BI tool and this means that you can specify custom HTML formatting in table cells. This HTML formatting is applicable for report's web view, PDF and HTML exports (including the case when a report is placed into an email body) + some functions may affect Excel export too. Technically custom HTML is configured as a calculated cube member with usage of special HTML-related functions:
Html.Link
to render a link (<a> tag).Html.SetTextColor
to set the color of the text (applied to cell's tag TH
/TD
).Html.SetBackgroundColor
to set background color of the text (applied to cell's tag TH
/TD
).Html.Raw
allows you to render any custom HTML code inside the table cell. With 2nd argument it is possible to specify a non-HTML value to use in non-HTML exports (CSV, Excel, JSON).
You can specify customized cell style (color/background color, bold/italics, font size etc) based on cell values. The following expression highlights with red measure values that below some threshold:
SumOfTotal
Expression
Html.SetTextColor( Html.Raw( Format("{0:#.##}", new[]{SumOfTotal}), SumOfTotal), SumOfTotal<200 ? "red" : null)In a similar way, if you don't want ' want to have colors in the Excel export too:
SumOfTotal<200 ? Html.Raw( "<span style='color:red;'>"+Html.HtmlEncode(SumOfTotal)+"</span>", SumOfTotal) : SumOfTotalThen add one more parameter to declare the name of measure that is used in the expression:
SumOfTotal
SumOfTotalFormatted
SumOfTotalFormatted
measure for Values. See here how it looks in the demo report.You can use HTML formatting for links rendering:
company_name
and company_website_url
dimensionsExpression
company_name_linked
Html.Link(company_website_url, company_name, true)Then add the following values to declare dimension names used in the expression:
company_name
company_website_url
company_name_linked
dimensionIn the same way you can render <img> tag and display images in the table cells.