waldopepper
Programmer
Hi - I have a variable I am grouping on but the values are not that descriptive so I have used a case statement to give the values more meaning - this is done in the grouping formula.
IF {SalesTransactionHeader.Stream} = "S" Then "Store"
ELSE IF {SalesTransactionHeader.Stream} = "T" Then "Telephone"
ELSE IF {SalesTransactionHeader.Stream} = "W" Then "Web"
ELSE IF {SalesTransactionHeader.Stream} = "O" Then "Store Telesales"
ELSE "Unknown value"
Which works fine in my report and counts look like this:
Store 1,000
Telephone 2,000
Web 3,500
Store Telesales 500
However the client want to merge the "S" and "O" values to both show as "Store".
I have changed my case statement to this:
IF {SalesTransactionHeader.Stream} = "S" Then "Store"
ELSE IF {SalesTransactionHeader.Stream} = "T" Then "Telephone"
ELSE IF {SalesTransactionHeader.Stream} = "W" Then "Web"
ELSE IF {SalesTransactionHeader.Stream} = "O" Then "Store"
ELSE "Unknown value"
But not in my report instead of
Store 1,500
Telephone 2,000
Web 3,500
It doesn't put these records together - they get grouped like this:
Store 1,000
Store 500
Telephone 2,000
Web 3,500
I've tried putting the criteria in the same part of the case statement but I get the same result
IF ({SalesTransactionHeader.Stream} = "S") OR ({SalesTransactionHeader.Stream} = "O") Then "Store"
ELSE IF {SalesTransactionHeader.Stream} = "T" Then "Telephone"
ELSE IF {SalesTransactionHeader.Stream} = "W" Then "Web"
ELSE "Unknown value"
any thoughts?
thx
W
IF {SalesTransactionHeader.Stream} = "S" Then "Store"
ELSE IF {SalesTransactionHeader.Stream} = "T" Then "Telephone"
ELSE IF {SalesTransactionHeader.Stream} = "W" Then "Web"
ELSE IF {SalesTransactionHeader.Stream} = "O" Then "Store Telesales"
ELSE "Unknown value"
Which works fine in my report and counts look like this:
Store 1,000
Telephone 2,000
Web 3,500
Store Telesales 500
However the client want to merge the "S" and "O" values to both show as "Store".
I have changed my case statement to this:
IF {SalesTransactionHeader.Stream} = "S" Then "Store"
ELSE IF {SalesTransactionHeader.Stream} = "T" Then "Telephone"
ELSE IF {SalesTransactionHeader.Stream} = "W" Then "Web"
ELSE IF {SalesTransactionHeader.Stream} = "O" Then "Store"
ELSE "Unknown value"
But not in my report instead of
Store 1,500
Telephone 2,000
Web 3,500
It doesn't put these records together - they get grouped like this:
Store 1,000
Store 500
Telephone 2,000
Web 3,500
I've tried putting the criteria in the same part of the case statement but I get the same result
IF ({SalesTransactionHeader.Stream} = "S") OR ({SalesTransactionHeader.Stream} = "O") Then "Store"
ELSE IF {SalesTransactionHeader.Stream} = "T" Then "Telephone"
ELSE IF {SalesTransactionHeader.Stream} = "W" Then "Web"
ELSE "Unknown value"
any thoughts?
thx
W