35 pts.
 subreport
I have a report in crystal ver.10 with tree subreport to calculated the misc.charge i use the case stament but now the database change the value in some case positive number and negative number the negative number display only when is a intercompany sales order. here is the original code Local NumberVar Amount; // 0 = Fixed // 1 = Pieces // 2 = Percent //// //select {MARKUPTRANS.MARKUPCATEGORY} // case 0 : Amount := ({MARKUPTRANS.VALUE} / {VENDINVOICETRANS.QTY}) * {?Transaction Qty} * (-1) // case 1 : Amount := {MARKUPTRANS.VALUE} * {?Transaction Qty} * (-1) // case 2 : Amount := {MARKUPTRANS.VALUE} * {VENDINVOICETRANS.QTY} * {VENDINVOICETRANS.PURCHPRICE} //// //case 2 : Amount := iif({MARKUPTRANS.VALUE}=0, 0, {?Sales Line Amount} * {MARKUPTRANS.VALUE}) // default: Amount := 0; // Amount; and here how i tray to modify is correct this method? Please help Amount; if {markuptrans.markupcategory} = 0 and {MARKUPTRANS.intercompanycompanyID} = 'vfc' then Amount := ({MARKUPTRANS.VALUE} / {VENDINVOICETRANS.QTY}) * {?Transaction Qty} else if {markuptrans.markupcategory} = 0 and {MARKUPTRANS.intercompanycompanyID} <> 'vfc' then Amount := ({MARKUPTRANS.VALUE} / {VENDINVOICETRANS.QTY}) * {?Transaction Qty} * (-1) else if {markuptrans.markupcategory} = 1 and {MARKUPTRANS.intercompanycompanyID} = 'vfc' and {MARKUPTRANS.INTERCOMPANYINVOICEID} <> "00000" then Amount := ({MARKUPTRANS.VALUE} / {VENDINVOICETRANS.QTY}) * {?Transaction Qty} * (-1) else if {markuptrans.markupcategory} = 1 and {MARKUPTRANS.intercompanycompanyID} <>'vfc' then Amount := ({MARKUPTRANS.VALUE} / {VENDINVOICETRANS.QTY}) * {?Transaction Qty} else if {markuptrans.markupcategory} = 2 and {MARKUPTRANS.intercompanycompanyID} <> 'vfc' then Amount := {MARKUPTRANS.VALUE} * {VENDINVOICETRANS.QTY} * {VENDINVOICETRANS.PURCHPRICE}

Software/Hardware used:
ASKED: May 28, 2009  3:00 PM
UPDATED: May 28, 2009  3:29 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _