I have a crystal report that needs a user defined function that should be created in C++ in order to work with our app. THe problem is that I have a group that has more than one priority or just one priority which can either be zero or the value one. I only want to show one record regardless of priority. However if there is more than one priority per group I need to show the one with the highest number being one or zero. I am lost anybody got any clues on how I can create a function fo this. I have tried every struc but nothing seems to work.