Question
Coforge
IN
Last activity: 23 Oct 2023 14:28 EDT
Hightlighting a row in reports.
Hi ,
How to Highlight a row in reports?
Please find the steps what I followed from the existing Article:
Step 1: Enabled the Display rows using Custom Section.
Step 2: Create a section, added the table .
Step 3: Added the inline style for Row, <pega:when name = "WhenCondition">color:red;</pega:when>
Results: When I ran the report for each result the table is getting repeated.
Also I have tried to highlight a column by using a table in section, same issue.
Can anyone help me out with issue?
Thanks,
Monisha
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Bits in Glass
IN
@Monisha D R instead of color:red, please use background-color:Red and try again.
Coforge
IN
@Anoop Krishna, Thanks for reply.
But i don't have any issue with highlight, when i run the report, for each result table is getting repeated.
EX: I got 16 results, table is getting repeated for 16 times
Bits in Glass
IN
@Monisha D R okay that is because you have sourced table layout in the custom section. Add dynamic layout and directly map the properties in that and try once.
Coforge
IN
@Anoop Krishna , i have tried by using the dynamic layout also, but the alignment is not proper.
Please find attachment.
Bits in Glass
IN
@Monisha D R okay now repeating issue is solved but now alignment issue. Right?
Coforge
IN
@Anoop Krishna , yes
Bits in Glass
IN
@Monisha D R try changing the layouts, formats, presentation tab and helper classes for better UI aspects.
Updated: 23 Oct 2023 9:01 EDT
Pegasystems Inc.
IN
Do you intend to show the results of the report definition in the report browser or in a custom landing page or section?
The steps you follow will work only for a table layout embedded in a section. The source of the table layout can be anything, including a report definition.
From your screenshots, it is inferred that you are either running the report directly or executing it from the report browser. In either case, the table layout (with virtual report definition) is embedded in a generic section categorized Final and Internal. It is neither allowed nor recommended to customize the section and define highlight conditions.
Do you intend to show the results of the report definition in the report browser or in a custom landing page or section?
The steps you follow will work only for a table layout embedded in a section. The source of the table layout can be anything, including a report definition.
From your screenshots, it is inferred that you are either running the report directly or executing it from the report browser. In either case, the table layout (with virtual report definition) is embedded in a generic section categorized Final and Internal. It is neither allowed nor recommended to customize the section and define highlight conditions.
As a workaround, you are trying to achieve this using a custom section for rows. The custom section for rows is applied for every row and should not have another table layout within itself. Given that you are rendering using dynamic layouts, please be aware that, you are replacing all of your <td> with a single <div> element within the <table> element. However, if you still insist on highlighting, try using free-form layouts with fixed widths. Ensure that the column headers in the report definition also have fixed widths, so that the column and data are aligned in all screen resolutions. Additionally, if the data in any cell can exceed the prescribed width, you may have to enable word wrap. All in all, the CSS aspects have to be well-defined for this to work. FYI, Pega no longer supports free-form layouts, however, you may copy and paste an existing free-form layout from any of the modal template sections.
If your intention is to simply categorize the results, I recommend that you check out Grouping under the Report Viewer tab.
Regards!
Coforge
IN
@shanj1 , Thank you.
I don't want to categorize the results, just want to Hightlight row/column based on condition in Reports.
I have tried in different approach as follows:
step1: I have created a custom control for pxUpdatetime property(wants to be highlighted).
step2: I am using HTML source as:
<pega:choose> <style> <pega:when name = "whenrule"> (when rule: pxUpdatetime==last 3 days) background-color: red; </pega:when> </style> </pega:choose>
Is Code Snippet is Correct?
Bits in Glass
IN
@Monisha D R is this working? Instead of going this way it's better to show the list in a table layout in a pop up. There you would be able to use your apply red colour easily. Will be easy to maintain also.
Coforge
IN
@Anoop Krishna, reports are used in Dashboard.
Bits in Glass
IN
@Monisha D R if you are able to find a way to do this in reports and that too without much customization, that's well and good. If you are aware of widget feature, you can add that in dashboard. As you have a requirement to highlight row, I think, would be better to think of alternate approaches other that reports. If possible, try to reduce customizations.