I have my document set to DoublePass, so therefore I only wanted it to happen in the second pass.
As a preparation you have to go to "Dictionary" and set up a Variable, in my case I am filtering dataitems with the name "parameter", so I set up the variable Param_ToBe_Printed: set it up as a list of strings.
Then use the following code in the BEFORE PRINT of the data item that you want to filter for duplicate. Note: If you have the SAME data item somewhere else, setting the same code somewhere else easily allows you to filter duplicates in the whole document!
Code: Select all
if(IsSecondPass){
if(Param_ToBe_Printed.Contains(Related_Requirements_2.Code)){
((Stimulsoft.Report.Components.StiComponent)(sender)).Enabled = false;
} else {
Param_ToBe_Printed.Add(Related_Requirements_2.Code);
}
}
regards