Highlight duplicates in column table

Jenkinsj5
edited February 11, 2022 in Analytics #1
<p><span style="font-size:medium;">[font="calibri;"]I am looking for a function similar to Excel (Conditional Formatting > Highlight Cells Rules > Duplicate Values…)[/font]</span></p><p> </p><p><span style="font-size:medium;">[font="calibri;"]I have searched the web, I found the flash example at [/font]</span><a data-ipb='nomediaparse' href='http://www.eclipse.org/birt/phoenix/examples/reports/highlighting/'><span style="font-size:medium;">[font="calibri;"][color=rgb(0,0,255);]http://www.eclipse.org/birt/phoenix/examples/reports/highlighting/[/color][/font]</span></a><span style="font-size:medium;">[font="calibri;"] but that is not a highlight duplicates function.[/font]</span></p><p> </p><p><span style="font-size:medium;">[font="calibri;"]Looking at the highlight rules in property editor, by cell, column or Data Element I don’t see any point and click options for comparing on cell/value to another in a different row. [/font]</span></p><p> </p><p><span style="font-size:medium;">[font="calibri;"]An option to pass conditional formatting to Excel (2003 xls) when opening as Excel would be a second choice option for me.[/font]</span></p><p> </p><p><span style="font-size:medium;">[font="calibri;"]I am using BIRT 4.2.1 [/font]</span></p><p><span style="font-size:medium;">[font="calibri;"] [/font]</span></p>
Warning No formatter is installed for the format ipb

Comments

  • <p>You will need to write script for this. Create a variable to store the previous value and compare that in your highlight rule.</p>
  • <p>I have tried it, but I think in Collections you can check the number of appearances a value occurs in a list.  In the onFetch() of your data set you could store the values in an ArrayList then create a highlight rule checking the number of occurrences the current value has in the list.  If it's over 1 then select your highlight color.</p>
    Warning No formatter is installed for the format ipb
  • <p>Thank you <span><a class="" href="http://developer.actuate.com/community/forum/index.php?/user/22-mblock/&quot; title=""><span>mblock</span></a></span> & <span><a class="" href="http://developer.actuate.com/community/forum/index.php?/user/46257-kclark/&quot; title=""><span>kclark</span></a></span>,</p><p> </p><p>I have an error in a report and I was looking to use a highlight dupes function to call them out, while I was problem solving.  For now the solution looks easier than highlighting the errors.</p>
    Warning No formatter is installed for the format ipb
  • kclark
    kclark E
    edited December 6, 2013 #5
    <p>Take a look at my example.  The logic for the duplicates is located in the highlight rule.  The key here is to have the table appear once so the arraylist gets populated.  You could use the Data Engine API to avoid this.  There might be a better way to do this but I threw this together real quick for you to look at.</p><p> </p><p>Edit:</p><p>I created the highlight rule on the entire row, if you're wanting this on just that cell the same script can be used for a highlight rule in the cell.</p>
    Warning No formatter is installed for the format ipb