Skip to Main Content
Feature Request FR-2775
Product Area Page Components
Status OPEN

21 Voters

Allow dynamic formatting of Report cells (IG, IR, CR)

pmushkov Public
· Sep 30 2022

Idea Summary
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">
 	<span class="u-color-20">3</span>
</td>

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.

Use Case
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">
 	<span>3</span>
</td>

Additionally Row CSS Classes option could be added to help style conditionally whole rows of the report, similar to the individual cells.

This idea is open.

Comments

Comments

  • jayson hanes Admin 8 weeks ago Edit

    For Classic Report, this is easily achieved by editing the underlying template that you want to use, which I think anyone that uses CR in a custom way must be doing.. for IR and IG this isn't as easy to customize and I think we can do better.

  • mark.vanuden 8 weeks ago Edit

    Changing/Copying a whole template for this purpose seems to me a bit of an overkill. I wholeheartedly support the original Idea.

  • indrek 7 weeks ago Edit

    Classic Report header should have possibility to set class, then it would be easy to make responsive reports adding example class hidden-xs-down to header and column.