I have a calculated field, with a formula inside it that runs fine and can be summarized in Crystal 8.5 When I try the exact same values and formula in Crystal 10.0 it says the "Field cannot be summarized". When I comment out one of the fields (it's fomula below), all works fine. Why would this work in Version 8.5, but not 10?
FORMULA1
//check if item is stocked and if not do not compute new balance (should be 0)
If {IMITMIDX_SQL.stocked_fg} = "Y" Then
// computes running total of the quantity balance
// transaction types that do not impact the balance
if {IMINVTRX_SQL.doc_type} = "A"
or {IMINVTRX_SQL.doc_type} = "B"
or {IMINVTRX_SQL.doc_type} = "C"
or {IMINVTRX_SQL.doc_type} = "G"
or {IMINVTRX_SQL.doc_type} = "L"
or {IMINVTRX_SQL.doc_type} = "O"
or {IMINVTRX_SQL.doc_type} = "W"
or {IMINVTRX_SQL.doc_type} = "H"
or ({IMINVTRX_SQL.doc_type} = "T"
// AND {@F_FromLocation} = {@F_ToLocation}
)
then {IMINVTRX_SQL.old_quantity}
else
// Deleted Item or negative Qty Transactions (Subtract)
if {IMINVTRX_SQL.doc_type} = "R"
then ({IMINVTRX_SQL.old_quantity} + IMINVTRX_SQL.quantity})
else
// Issue Transactions (Subtract)
if {IMINVTRX_SQL.doc_type} = "I" then
//if negative old_quantity then add
if {IMINVTRX_SQL.source} = "R" and {IMINVTRX_SQL.old_quantity} < 0 then
({IMINVTRX_SQL.old_quantity} + IMINVTRX_SQL.quantity} * -1))
else
({IMINVTRX_SQL.old_quantity} - ({IMINVTRX_SQL.quantity} * -1))
else
// Transfer Transactions (Add or Subtract)
if {IMINVTRX_SQL.doc_type} = "T"
then
if {IMINVTRX_SQL.lev_no} = 0 then
{IMINVTRX_SQL.old_quantity} + ({IMINVTRX_SQL.quantity} * -1)
else
{IMINVTRX_SQL.old_quantity} + {IMINVTRX_SQL.quantity}
// all other transaction types except Transfers
else
{IMINVTRX_SQL.old_quantity} + {IMINVTRX_SQL.quantity}
Else
0;
FORMULA1
//check if item is stocked and if not do not compute new balance (should be 0)
If {IMITMIDX_SQL.stocked_fg} = "Y" Then
// computes running total of the quantity balance
// transaction types that do not impact the balance
if {IMINVTRX_SQL.doc_type} = "A"
or {IMINVTRX_SQL.doc_type} = "B"
or {IMINVTRX_SQL.doc_type} = "C"
or {IMINVTRX_SQL.doc_type} = "G"
or {IMINVTRX_SQL.doc_type} = "L"
or {IMINVTRX_SQL.doc_type} = "O"
or {IMINVTRX_SQL.doc_type} = "W"
or {IMINVTRX_SQL.doc_type} = "H"
or ({IMINVTRX_SQL.doc_type} = "T"
// AND {@F_FromLocation} = {@F_ToLocation}
)
then {IMINVTRX_SQL.old_quantity}
else
// Deleted Item or negative Qty Transactions (Subtract)
if {IMINVTRX_SQL.doc_type} = "R"
then ({IMINVTRX_SQL.old_quantity} + IMINVTRX_SQL.quantity})
else
// Issue Transactions (Subtract)
if {IMINVTRX_SQL.doc_type} = "I" then
//if negative old_quantity then add
if {IMINVTRX_SQL.source} = "R" and {IMINVTRX_SQL.old_quantity} < 0 then
({IMINVTRX_SQL.old_quantity} + IMINVTRX_SQL.quantity} * -1))
else
({IMINVTRX_SQL.old_quantity} - ({IMINVTRX_SQL.quantity} * -1))
else
// Transfer Transactions (Add or Subtract)
if {IMINVTRX_SQL.doc_type} = "T"
then
if {IMINVTRX_SQL.lev_no} = 0 then
{IMINVTRX_SQL.old_quantity} + ({IMINVTRX_SQL.quantity} * -1)
else
{IMINVTRX_SQL.old_quantity} + {IMINVTRX_SQL.quantity}
// all other transaction types except Transfers
else
{IMINVTRX_SQL.old_quantity} + {IMINVTRX_SQL.quantity}
Else
0;