Currently each column in any of the 3 types of Reports, allow custom HTML to be used for rendering. Here is a sample for a formatted rendered cell:
<td class="t-Report-cell" align="center" headers="COLUMN_NAME">
What is the problem?
Using the builder, we can only style the content of the <td> element (using HTML Expressions), and not the <td> element itself. The Interactive Grid is a little more advanced, having CSS Classes option under Appearance section. It applies the style exactly on the <td> element. However, this field doesn't accept the SQL query column names as substitution string (like the HTML Expression does for example). For the Interactive Report and Classic Report there is no such option at all. Classic Report has a similar one, but it applies the CSS class to the inner element - in the example above it the <span>.
*APEX currently supports formatting, but only to the content of the <td>, which is not always enough to produce a good result.
Allowing the use of the Report columns as substitution strings in the Interactive Grid and adding the new option for the Interactive Report and Classic Report will help developers apply custom logic when they want to format each individual cell conditionally using their report query.
Preferred Solution (Optional)
What is the solution?
The solution is a little different for each Report type:
- For Interactive Grid - allow CSS Classes option to accept the SQL query column name and be used as a substitution string, just like in HTML Expressions.
- For Interactive Report and Classic Report - add a new option, named CSS Classes or Cell CSS Classes which accept the SQL query column name and can be used as a substitution string, just like in HTML Expressions. The CSS Classes added there, would be applied to the <td> element directly.
<td class="u-color-20 t-Report-cell" align="center" headers="COLUMN_NAME">
Additionally Row CSS Classes option could be added to help style conditionally whole rows of the report, similar to the individual cells.