Group Specified on a non recurring field - another twist
Posted on 2005-03-17
I have a situation which I'm sure many people have run into:
My recordset contains items which need to be grouped by manufacturer status. If the status of a particular item is unavaiable but other items by the manufacturer are available, the manufacturer status needs to be set to available. However, if all the items by the manufacturer are unavailable, the status of the manufacturer should be unavailable.
I wrote a formula to do a distict count on the item status at the manufacturer level and compare that to the item status. If the distinct count > 1, the manufacturer status is set to 'A'. If the distinct count = 1 and item status = 'U', the manufacturer status is set to 'U'. Else the manufacturer status is set to 'A'. That all works fine.
Now for the twist. I need to group all the available manufacturera together and all the unavailable manufacturers together. I can't do this based on my manufacturer status formula because it uses the distinct count function.
I'm using Crystal 8.5. The report is being run off a single SQL stored procedure which is shared by other reports, so I can't change it to do this modification within the sp. I would love to use a SQL Expression, but they aren't available in 8.5.
There has to be a way to group based on a variable in Crystal. Does anyone know the way? Do I need a evaluation time function somewhere along the line? Use Variables?
Thanks in advance!