Basically we should pass in the column1 (grouping) value and compare it to the last one we printed. If it's the same, return an empty string and if it's different, we store and show the new value. We can declare a string variable to hold the value of the last-printed value in between item bindings.
The above scenario can be handled in two ways:
I have attached a sample solution with two reports that demonstrates both approaches. Please note the UserFunction should be public static (Public Shared in VB) and the old-value-storage should be static too.
I hope this helps someone and you enjoy this week's Reporting Tips & Tricks post!
Stefan’s main interests outside the .NET domain include rock music, playing the guitar and swimming.
Subscribe to be the first to get our expert-written articles and tutorials for developers!