Click here to Skip to main content
15,887,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a report in Crystal Reports that has work order (WO) information at different levels

Group 1 = Total number of WO's

Group 2 = Total Closed WO's and Total Open WO's

Group 3 = Info on all WO's by group ( open or closed)

This took some learning but I finally got all the counts correct by choosing the sigma icon and doing a distinct count for each group. so all is good.

NOW I need to calculate the cost for each WO. When I do this Only the close WO's show due to the fact that the cost is not calculated for the WO until it is closed.

What I am looking for: Would love for the report to work the same as it did before but now for the closed work orders have the ability to show the cost associated with it with the same effect. Any help would be great


What I have tried:

What have I tried: For the cost formula I tried the following : if {WORKORDER.STATUS}="Closed" then {WORKORDERCOSTSUMMARY.EQUIPMENTCOST}+{WORKORDERCOSTSUMMARY.LABORCOST}+{WORKORDERCOSTSUMMARY.MATERIALCOST} else 0
Posted
Updated 6-Jan-20 4:16am

this sounds like a join issue.
The formula field is enforcing the join to the WORKORDERCOSTSUMMARY table which has no matching rows for closed orders.
In crystal the join is not automatically enforced. You have to set it to enforced or use a field from each table int he join (or end node in a chain) for it to become enforced.
You will need to set the join to an outer join.

See the answer and more discussion here
http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22852&PID=74819#74819
 
Share this answer
 
this sounds like a join issue.
The formula field is enforcing the join to the WORKORDERCOSTSUMMARY table which has no matching rows for closed orders.
In crystal the join is not automatically enforced. You have to set it to enforced or use a field from each table int he join (or end node in a chain) for it to become enforced.
You will need to set the join to an outer join.
 
Share this answer
 
Comments
Maciej Los 6-Jan-20 10:28am    
Please, delete this answer as it is a repost.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900