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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running total field cannot be created 1

Status
Not open for further replies.
May 21, 2001
52
US
I am creating a crystal report. This is what you would see in the crystal report. This is NOT a database table. I can show you better than I can explain:

type_of_deduction YDT_deductions Selected_deductions
a 20
b 30 30
c 40
d 50 50


I am using an If then statement to get the "selected_deductions". I just want certain deductions in this field...not all of them. The problem I am having is I can't total those selected deductions. I have used the sum expression but get the message "running total cannot be created. ANY SUGGESTIONS?
 
Post your exact if-then statement, and we will tell you why. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
This is my If Then statement for selected_deduction:

WhilePrintingRecords;

If ({PR4_EmployeeEarningDeduction.RecordType} = "D" and
{PR4_EmployeeEarningDeduction.EarningsDeductionCode} = "S") Or

({PR4_EmployeeEarningDeduction.RecordType} = "D" and
{PR4_EmployeeEarningDeduction.EarningsDeductionCode} = "V") Or

({PR4_EmployeeEarningDeduction.RecordType} = "D" and
{PR4_EmployeeEarningDeduction.EarningsDeductionCode} = "D") Or

({PR4_EmployeeEarningDeduction.RecordType} = "D" and
{PR4_EmployeeEarningDeduction.EarningsDeductionCode} = "L") Or

({PR4_EmployeeEarningDeduction.RecordType} = "D" and
{PR4_EmployeeEarningDeduction.EarningsDeductionCode} = "CA")
then {PR4_EmployeeEarningDeduction.YtdDeductionAmount};

I am wanting to sum up the results of this equation in a new field.

 
Your formula will be fine if you take out the "WhilePrintingRecords" line.

Although it will be simpler if you write:

If ({PR4_EmployeeEarningDeduction.RecordType} = "D" and {PR4_EmployeeEarningDeduction.EarningsDeductionCode} in ["S","V","D","L","CA"]
then {PR4_EmployeeEarningDeduction.YtdDeductionAmount} Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top