Trying to set one value from another in crystal reports -


hi have problem can't seem around, new crystal if have missed please point out. trying achieve this. if set of conditions met print value if other conditions met print different value or else print main header. below have far,

my problem can't seem set string correct.

whileprintingrecords;   booleanvar bprintedrad;   booleanvar bprintedgcs;   booleanvar bprintedhead;   booleanvar bprintedthrom;   booleanvar bprintedwar;   booleanvar bprintedpap;   booleanvar bprintedsym;    if {is_dhft_aide_memoir.codenum} = 5     {is_dhft_aide_memoir.orderitemname};     shared stringvar orderitemnameq:= {is_dhft_aide_memoir.orderitemname};       if orderitemnameq = "ct brain"        if {cv3orderuserdata.userdatacode} = "rad clinical pathways"       //and {cv3orderuserdata.value} = "stroke"     , instr ({cv3orderuserdata.value},"stroke")>0     bprintedrad := true;     if {cv3orderuserdata.userdatacode} = "ctbrain2gcs"     , {cv3orderuserdata.value} = "1" bprintedgcs := true;   if {cv3orderuserdata.userdatacode} = "ctbrain2headache"    , {cv3orderuserdata.value} = "1" bprintedhead := true;  if {cv3orderuserdata.userdatacode} = "ctbrain2strokethrom"   , {cv3orderuserdata.value} = "1" bprintedthrom := true;  if {cv3orderuserdata.userdatacode} = "ctbrain2warfarin"   , {cv3orderuserdata.value} = "1" bprintedwar := true;  if {cv3orderuserdata.userdatacode} = "ctbrainpapillo"   , {cv3orderuserdata.value} = "1" bprintedpap := true;  if {cv3orderuserdata.userdatacode} = "ctbrainprogsym"   , {cv3orderuserdata.value} = "1" bprintedsym := true;   if bprintedrad = true , (bprintedgcs = true or bprintedhead = true or   bprintedthrom = true or    bprintedwar = true or bprintedpap = true or bprintedsym = true)    orderitemnameq := "stroke 1 hour"  else   if bprintedrad = true , (bprintedgcs = false , bprintedhead = false ,   bprintedthrom = false ,  bprintedwar = false , bprintedpap = false , bprintedsym = false)    orderitemnameq := "stroke 24 hours" 

i think formula correct haven't correctly closed blocks. try this:

whileprintingrecords;   booleanvar bprintedrad;   booleanvar bprintedgcs;   booleanvar bprintedhead;   booleanvar bprintedthrom;   booleanvar bprintedwar;   booleanvar bprintedpap;   booleanvar bprintedsym; shared stringvar orderitemnameq;    if {is_dhft_aide_memoir.codenum} = 5        orderitemnameq:= {is_dhft_aide_memoir.orderitemname};       if orderitemnameq = "ct brain"     (   if {cv3orderuserdata.userdatacode} = "rad clinical pathways"       //and {cv3orderuserdata.value} = "stroke"     , instr ({cv3orderuserdata.value},"stroke")>0     bprintedrad := true;     if {cv3orderuserdata.userdatacode} = "ctbrain2gcs"     , {cv3orderuserdata.value} = "1" bprintedgcs := true;   if {cv3orderuserdata.userdatacode} = "ctbrain2headache"    , {cv3orderuserdata.value} = "1" bprintedhead := true;  if {cv3orderuserdata.userdatacode} = "ctbrain2strokethrom"   , {cv3orderuserdata.value} = "1" bprintedthrom := true;  if {cv3orderuserdata.userdatacode} = "ctbrain2warfarin"   , {cv3orderuserdata.value} = "1" bprintedwar := true;  if {cv3orderuserdata.userdatacode} = "ctbrainpapillo"   , {cv3orderuserdata.value} = "1" bprintedpap := true;  if {cv3orderuserdata.userdatacode} = "ctbrainprogsym"   , {cv3orderuserdata.value} = "1" bprintedsym := true; )  if bprintedrad = true , (bprintedgcs = true or bprintedhead = true or   bprintedthrom = true or    bprintedwar = true or bprintedpap = true or bprintedsym = true)    orderitemnameq := "stroke 1 hour"  else   if bprintedrad = true , (bprintedgcs = false , bprintedhead = false ,   bprintedthrom = false ,  bprintedwar = false , bprintedpap = false , bprintedsym = false)    orderitemnameq := "stroke 24 hours"; orderitemnameq; 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -