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

CR9 Sum field on one table of 2 joined tables

Status
Not open for further replies.

Kakoivini

Programmer
Dec 2, 2004
15
US
Greetings all,

CR9, no procedure, Unix database

I have a report that needs to sum the total of pallet locations in one table (lc_f) but ignore the same info in the joined table (iv_f). I only need certain location types of locations which are stored in the iv_f table. These tables are joined because this report also gives the number of filled locations from the iv_f table. The 4 formulas curently being used are:

DisplayA //the total of pallet locations//
whileprintingrecords;
shared numbervar a;

fldDetailSum //total of filled loc//
Sum ({lc_f.size_load_cap}) //this field keeps track of how many pallet positions there are including the ones I do not want.

Reset //report header//
shared numbervar showNote :=0;

totalPercentHeader //percent of utilization in the warehouse//
if {@fldDetailSum}=0 then
0
else
{@DisplayA}/{@fldDetailSum}*100

2 totals work (locations filled & % utilization), the pallet locations is not working. Too many locations are being returned. I need to isolate the location types that I need (bulk, fifo, lifo & fp) from the rest of the location types (lc_f.loc_type). Help please :)

 
Hi,Not sure I complete follow but try this..

Create a formula that tests the lc_f.loc_type and if
is one of the ones you want to count make it evaluate to 1 otherwise 0. Place that formula in the report and sum it to give the count of just those you want.


[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top