I am trying to get the subtotal of the following example to display in D12.2 but I want the Margin column to remain D12.4. I need the precision to the subtotal to remain at 4 decimals but then only round up or down on the final value of the subtotal when it is displayed and not rounded for each row of data, I only want the subtotal to round up based on the D12.4 values. Does anyone know how if this possible? I have been reading the manual and other posts on this forum to try to figure it out and I am at a loss. Not a fan of how rounding is taken care of thus far unless someone can enlighten me. I wrote the following to try to get close what I am looking for(thanks in advance to anyone willing to take on my challenge):
DEFINE FILE CAR
MARGIN/D12.4% = ((RETAIL_COST / DEALER_COST)-1.00)*100;
SPACER/A1 = '';
END
TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
MARGIN
BY SPACER NOPRINT
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
BY SEATS
ON SPACER SUBFOOT
"<+0>ST MARGIN:<+0><ST.MARGIN"
ON TABLE SET STYLE *
TYPE=SUBFOOT, OBJECT=TEXT, LINE=1, ITEM=1, POSITION=FUND_CLASSIFICATION,JUSTIFY=RIGHT, SIZE=9,COLSPAN=6,$
TYPE=SUBFOOT, OBJECT=FIELD, LINE=1, ITEM=1, POSITION=FUND_CLASSIFICATION,JUSTIFY=RIGHT, SIZE=9,COLSPAN=1,$
ENDSTYLE
END
This message has been edited. Last edited by: neuro,
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
Test: WebFOCUS 7.6.11
Dev: WebFOCUS 7.6.11
April 15, 2013, 02:32 AM
Danny-SRL
Hi Neuro, This should do the trick:
DEFINE FILE CAR
MARGIN/D12.4% = ((RETAIL_COST / DEALER_COST)-1.00)*100;
SPACER/A1 = '';
END
TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
MARGIN
BY SPACER NOPRINT
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
BY SEATS
ON SPACER RECAP
STMARGIN/D12.2%=MARGIN;
ON SPACER SUBFOOT
"<+0>ST MARGIN:<+0><STMARGIN"
ON TABLE SET STYLE *
TYPE=SUBFOOT, HEADALIGN=BODY, $
TYPE=SUBFOOT, OBJECT=TEXT, LINE=1, ITEM=1, JUSTIFY=RIGHT, SIZE=9,COLSPAN=7,$
TYPE=SUBFOOT, OBJECT=FIELD, LINE=1, ITEM=1,JUSTIFY=RIGHT, SIZE=9,COLSPAN=1,$
ENDSTYLE
END
Nonetheless, I would use the following RECAP instead:
ON SPACER RECAP
STMARGIN/D12.2%=((RETAIL_COST / DEALER_COST)-1.00)*100;
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
April 15, 2013, 04:10 PM
neuro
This worked. I had to go with Packed Decimal format as well use your code. Thank you very much!
ON SPACER RECAP
STMARGIN/P12.2%=MARGIN;
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
Test: WebFOCUS 7.6.11
Dev: WebFOCUS 7.6.11
April 16, 2013, 04:17 AM
Mayank Agrawal
Hi, This is a very good approach. I was also needing the same kind of formatting, and Focal point members provided me the similar solution. Thanks.
7.6.11, Windows Excel, HTML,PDF
April 16, 2013, 03:24 PM
neuro
I like to think that by taking the time to write a CAR example helps with getting responses rather just blurting out a question and hoping blindly for an answer. Plus visual representation helps too! Tried to do my due diligence to show I was giving an honest effort. Thanks again, Daniel, the solution is working great!
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11