Highlight duplicates in column table

[font="calibri;"]I am looking for a function similar to Excel (Conditional Formatting > Highlight Cells Rules > Duplicate Values…)[/font]

 

[font="calibri;"]I have searched the web, I found the flash example at [/font][font="calibri;"][color=rgb(0,0,255);]http://www.eclipse.org/birt/phoenix/examples/reports/highlighting/[/color][/font][font="calibri;"] but that is not a highlight duplicates function.[/font]

 

[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]

 

[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]

 

[font="calibri;"]I am using BIRT 4.2.1 [/font]

[font="calibri;"] [/font]

Silence Bestows Consent

Comments

  • You will need to write script for this. Create a variable to store the previous value and compare that in your highlight rule.

  • kclarkkclark BIRT Guru EM

    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.

    Kristopher Clark

    Actuate Corporation – The BIRT Company™

    http://www.actuate.com | http://birtondemand.com

     

    My Blog

    Twitter

    LinkedIn
    Facebook
     

  • Thank you mblock & kclark,

     

    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.

    Silence Bestows Consent
  • kclarkkclark BIRT Guru EM
    edited December 6, 2013

    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.

     

    Edit:

    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.

    Kristopher Clark

    Actuate Corporation – The BIRT Company™

    http://www.actuate.com | http://birtondemand.com

     

    My Blog

    Twitter

    LinkedIn
    Facebook
     

Sign In or Register to comment.