Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If then statement in running total

Status
Not open for further replies.
Sep 16, 2005
191
US
Is it possible to use if then in a running total?
Here is my running total:

Running Total Name: OverPaymentAmt
Field to Summarized: Invoice_Line_Item.Amount
Type of Summary: sum
Evaluate: Use a formula: {TB_FIN_INVOICE_LINE_ITEM.PE}= '9903'
Reset: on change of group: invoice_line_item.invoice_id

Basically: I need to evaluate on the following: If {TB_FIN_INVOICE_LINE_ITEM.Related_PE}= '9903' and {TB_FIN_INVOICE_LINE_ITEM.PE}= '9921' and
{TB_FIN_INVOICE_LINE_ITEM.PE}= '9903'
then I want to not display the amount
else if {TB_FIN_INVOICE_LINE_ITEM.PE}= '9903' and
{TB_FIN_INVOICE_LINE_ITEM.Related_PE}= '9903' and no PE 9921 in this line item then I want it to display 9903's amount.

Not sure how to write the if then statement in the running total. Please advice.
 
Since this logic:

"If {TB_FIN_INVOICE_LINE_ITEM.Related_PE}= '9903' and {TB_FIN_INVOICE_LINE_ITEM.PE}= '9921' and
{TB_FIN_INVOICE_LINE_ITEM.PE}= '9903'"

could never happen, I suggest that you think this over and repost.

How could a value be 2 things at once?

Rather than trying to specify architecture, try posting the environment and the requirements, someone here might think of a different way of approaching it, and your goal is likely to meet requirements, not specify a design condition (Running Total).

I'll guess that what you mean is that you wish to create a conditional sum of the 9903 amount (doesn't have to be a Running Total), in the event that none of the line items within that group are 9921.

So a 3 formula will probably be required, but I'd want real technical information first:

Crystal verison
Database used
Example data
Expected output, and where.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top