Need help to create a formula in crystal syntax(Crystal reports) to calculate number of days between two dates from WO_DATE.WO_DATE (WO = work order) where WO_DATE_TYPE.WO_DATE_TYPE_DESC = "START" and WO_DATE_TYPE.WO_DATE_TYPE_DESC = "Due".
Below is my DB Schema
CodePudding user response:
In Crystal's database expert, add the WO_Date table twice. The 2nd instance would require an Alias (a different name).
Join to require the Work_Order_ID be the same across the two instances. In the record selection formula, force the first instance to be the START type. Similarly, force the second instance to be the END type.
Now, simply subtract the date in the first table instance from the date in the second table instance.