subreport

35 pts.
Tags:
Crystal Reports
Crystal Reports 10
Crystal Reports 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}

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following