Reprinting Order Confirmation

Dear All,
I would like to reprint order confirmation with different completed status in OEORDH & OEORDD.
So I edited the selection formula in crystal report (oeconf01) like that.

    (
      ({OEORDH.COMPLETE} = 1 or {OEORDH.COMPLETE} = 2) or
   // order header is complete but details are not
       (({OEORDH.COMPLETE} = 3 or {OEORDH.COMPLETE} = 4 or {OEORDH.COMPLETE} = 5)or
        {OEORDD.COMPLETE} = 0 or {OEORDD.COMPLETE} = 1 or {OEORDD.COMPLETE} = 2 or {OEORDD.COMPLETE} = 3)
   ) and

(
    // print previously printed orders
        {?PRINTED} = "1"  or
    // print previously unprinted orders or Internet orders or Eletronic Commerce orders
        (  {?PRINTED}="0" AND (  {OEORDH.PRINTSTAT} =1 OR {OEORDH.PRINTSTAT} =0 OR {OEORDH.PRINTSTAT} =2 OR {OEORDH.PRINTSTAT} =3 OR {OEORDH.PRINTSTAT} =-1  )  )
    ) and.

But I still can't print order confirmation with completed status.

Any suggestion would appreciate.

  • 0
    Just take out all that PRINTSTAT logic completely.
  • 0 in reply to Jay Converse Acumen
    Thanks Jay,
    I commented out all the PRINTSTAT and Complete Status from the selection formula like that, but I can't print out all order confirmation. I don't know where I'm wrong.
    if {?SWDELMETHOD} = "1" then //Selection partly done in UI - sortto and sortfrom is the same
    (
    // Due to the fact that Orion framework doesn't have support for Crystal Command Object
    // We have to following what was being done in OE1200 VB UI. Q2O don't need all conditions for
    // the record selection formula because we will print no matter completed order, on hold order or printed, etc.
    {OEORDH.ORDNUMBER} = {?SORTFROM} and (NOT (ISNULL ({OEORDH.ORDNUMBER}))) and ({OEORDH.TYPE} <> 4)

    // The following criteria is being deleted because this is no longer use by OE order entry ui
    // {OEORDH.ORDNUMBER} = {?SORTFROM} and
    // (
    // order is not complete
    // ({OEORDH.COMPLETE} = 1 or {OEORDH.COMPLETE} = 2) or
    // order header is complete but details are not
    // (({OEORDH.COMPLETE} = 3 or {OEORDH.COMPLETE} = 4 or {OEORDH.COMPLETE} = 5) and {OEORDD.COMPLETE} = 0)
    // )
    )
    else // No selection in UI
    (
    // order number not null
    NOT(ISNULL({OEORDH.ORDNUMBER})) and

    // order number range
    (
    {OEORDH.ORDNUMBER} >= {?SORTFROM} and
    {OEORDH.ORDNUMBER} <= {?SORTTO}
    ) and

    // order not on hold
    // KRISA90 #141262 Checked for printing of ONHOLD orders
    ({?SWPRINTONHOLD} = "1" OR {OEORDH.ONHOLD} = 0) and

    // order not a quote
    {OEORDH.TYPE} <> 4 and

    // order is not complete
    // (
    // ({OEORDH.COMPLETE} = 1 or {OEORDH.COMPLETE} = 2) or
    // order header is complete but details are not
    // (({OEORDH.COMPLETE} = 3 or {OEORDH.COMPLETE} = 4 or {OEORDH.COMPLETE} = 5) and
    // {OEORDD.COMPLETE} = 0 or {OEORDD.COMPLETE} = 1 or {OEORDD.COMPLETE} = 2 or {OEORDD.COMPLETE} = 3)
    // ) and

    (
    // print previously printed orders
    {?PRINTED} = "1" or
    // print previously unprinted orders or Internet orders or Eletronic Commerce orders
    {?PRINTED}="0"
    // AND ( {OEORDH.PRINTSTAT} =1 OR {OEORDH.PRINTSTAT} =0 OR {OEORDH.PRINTSTAT} =2 OR {OEORDH.PRINTSTAT} =3 OR {OEORDH.PRINTSTAT} =-1 ) )
    ) and
    // if delivery method is 3, always select customer
    // else select customer that have delivery method of mail
    (
    {?SWDELMETHOD} = "3" or
    (
    {?SWDELMETHOD} = "2"
    and
    {ARCUS.DELMETHOD} = 0
    )
    )
    )