I have a report that uses a few tables each of which contains several fields.
The report needs to be grouped on a particular field (MyTable6.Field3), unless there is a value in a second field (MyTable1.Field1) in which case I need to use that value.
To that end, I created a formula (called Group1) that is something similar to this:
if
Trim({MyTable1.Field1}) <> ""
then
{MyTable1.Field1}
else
{MyTable6.Field3}
And then used that formula (Group1) in the Grouping Expert.
It doesn't work. All I get are the groupings from MyTable6.Field3's value. If I capture the SQL and put it in MSSMS, I can see the one or two records that has a value in the field represented by MyTable1.Field1, but it does not group on it.
What am I doing wrong?
TIA