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!

Records not Showing

Status
Not open for further replies.

bhansen

IS-IT--Management
Mar 14, 2002
53
CA
My formula

if {EMP_TRANS.TRANS_DATE} >= {PA_EMP_OVH.START_DATE} and {EMP_TRANS.TRANS_DATE} <= {PA_EMP_OVH.END_DATE}
then {PA_EMP_OVH.OVH_PRCNT}
else {EMPLOYEE.EMP_OVERHEAD_PCT}

My formula takes the Transaction date and compares it to a history table to look for changes in overhead, if the overhead is between that range it uses it, but if not it shows the currnt overhead rate

Now the problem not everyone has a listing in the history table, but they do have a listing in the current overhead table. My report only shows records of people who have a listing in the history table and no one else.

Is there a workaround to this?
 
It is unclear to me which of the fields in your formula is the history table, but the solution to your problem is to test for nulls first, write the formula on how to treat them if it is null, and then to use the logic you have already written:

If IsNull({Fieldname}) Then .....

Else

Your formula Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
The tables with OVH are the history tables.

Here is my formula, but it still does not show all employees if with this formula is in the details. It only seems to show employees who were in the history table.


if isnull({PA_EMP_OVH.EMP_NUM}) then (EMPLOYEE.EMP_OVERHEAD_PCT} else

if {EMP_TRANS.TRANS_DATE} >= {PA_EMP_OVH.START_DATE} and {EMP_TRANS.TRANS_DATE} <= {PA_EMP_OVH.END_DATE}
then {PA_EMP_OVH.OVH_PRCNT}
else {EMPLOYEE.EMP_OVERHEAD_PCT}
 
You need a Left Outer Join between table EMP_TRANS and table PA_EMP_OVH. Look in Database/Visual Linking Expert/Link Options
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top