As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
I am summing the extprice and extcost for each salesrep (481,678,...) The Goals column is their monthly goal that is to be printed only one(1) time in the subfooting.
I am looking for an answer of how I can grab the monthly goal (goals), to print that one(1) without summing that goals for each record/salesrep;
I tried this logic with no success:
DEFINE FILE HOLD1 PRCUSTNUM/I6 = CUSTNUM; PREXTPRICE/D12.2SMB = EXTPRICE/100; PREXTCOST/D12.2SMB = IF GLOFFSET EQ 'PF' THEN 0.00 ELSE EXTCOST/100; PRGOALS/D12.2SMB = IF GOAL EQ LAST GOAL AND SALESREP NE LAST SALESREP THEN GOAL ELSE 0; <---- END
FYI, I'm using SQLPassthru to retrieve all my records and holding in HOLD1.
ThanksThis message has been edited. Last edited by: FP Mod Chuck,
Posts: 38 | Location: Atlanta | Registered: June 14, 2005
You could try putting it in a parameter, something like this
TABLE FILE CAR
COMPUTE VALUE/A500 = IF LAST SALES LE 0 THEN EDIT(MAX.SALES) ELSE LAST VALUE ||','||EDIT(MAX.SALES);
WHERE SALES GT 0
ON TABLE HOLD
TABLE FILE HOLD
ON TABLE HOLD AS SUBVALUE
TABLE FILE CAR
PRGOALS/D12.2SMB = IF GOAL EQ LAST GOAL AND SALESREP NE LAST SALESREP THEN GOAL ELSE 0; <----
Try instead something similar to this Assuming that for a same SALESREP and CUSTNUM the GOAL is the same otherwise it doesn't really make sense to have different GOAL for the same SALESREP/CUTNUM; if it's the cas then we're missing a Key to make it unique
SET NODATA = ''
DEFINE FILE HOLD1
PRGOALS/D12.2SMB MISSING ON = IF SALESREP EQ LAST SALESREP THEN (IF CUSTNUM EQ LAST CUSTNUM THEN MISSING ELSE GOAL) ELSE GOAL;
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013