I am using Crystal 8.5 and am trying to do a nested case statement. I cannot seem to get it to work and am not sure if it can be done. I was looking at a 8.5 book and there is no clear descriptive way of indicating the end of one select case and starting another.
the code looks as follows.
Select {inventory_transact_table.transaction_type_code}
Case "1":
"Receive"
Case "2":
If ({inventory_transact_table.v_pick_up_type_code} = "1" ) AND
({inventory_transact_table.v_exception_dose_code} = "N" or isnull({inventory_transact_table.v_exception_dose_code} ) )then
"DOS"
Else If {inventory_transact_table.v_pick_up_type_code} = "1" Then
"DOS-EXC"
Else If {inventory_transact_table.v_exception_dose_code} = "N" Then
"T/O"
Else
"T/O-EXC"
Case "3":
If IsNull({inventory_transact_table.LINK_TO_TRANSFER_INV}) Then
"ADJ"
Else If {inventory_transact_table.amount} < 0 Then
"Transfer Out"
Else
"Transfer In"
Case "4":
if isnull({inventory_transact_table.PATID}) then
"PP-RTI"
else
"RTI"
Case "5":
"Open"
Case "6":
"Close"
Case "7":
if isnull({inventory_transact_table.PATID}) then
"PP-Spill"
else
"Spill"
******end of code*************
under the case 2 I would like to add the following after the else , t/o but not part of the if statement.
Select {inventory_transact_table.v_PP_current_status_code}
CASE "5","6":
"PP-Pouredx"
Can this be done and if so how, Any Help would be appreciated.
the code looks as follows.
Select {inventory_transact_table.transaction_type_code}
Case "1":
"Receive"
Case "2":
If ({inventory_transact_table.v_pick_up_type_code} = "1" ) AND
({inventory_transact_table.v_exception_dose_code} = "N" or isnull({inventory_transact_table.v_exception_dose_code} ) )then
"DOS"
Else If {inventory_transact_table.v_pick_up_type_code} = "1" Then
"DOS-EXC"
Else If {inventory_transact_table.v_exception_dose_code} = "N" Then
"T/O"
Else
"T/O-EXC"
Case "3":
If IsNull({inventory_transact_table.LINK_TO_TRANSFER_INV}) Then
"ADJ"
Else If {inventory_transact_table.amount} < 0 Then
"Transfer Out"
Else
"Transfer In"
Case "4":
if isnull({inventory_transact_table.PATID}) then
"PP-RTI"
else
"RTI"
Case "5":
"Open"
Case "6":
"Close"
Case "7":
if isnull({inventory_transact_table.PATID}) then
"PP-Spill"
else
"Spill"
******end of code*************
under the case 2 I would like to add the following after the else , t/o but not part of the if statement.
Select {inventory_transact_table.v_PP_current_status_code}
CASE "5","6":
"PP-Pouredx"
Can this be done and if so how, Any Help would be appreciated.