Hello, I am working on a PDF report which has about 90 columns and some compute values and all of them uses "OVER" because client wanted vertical report.
Here is what code looks like :-
TABLE FILE CAR
SUM
CAR OVER
MODEL OVER
BODYTYPE OVER
LENGTH OVER
WIDTH OVER
HEIGHT OVER
WEIGHT OVER
FUEL_CAP OVER
BHP OVER
MPG OVER
ACCEL OVER
WARRANTY OVER
SEATS OVER
DEALER_COST OVER
RETAIL_COST OVER
COMPUTE REVENUE/D12.2 = RETAIL_COST - DEALER_COST; AS 'Revenue per car' OVER
SALES OVER
COMPUTE TOTALREVENUE/D12.2 = REVENUE * SALES; AS 'Total Revenew' OVER
COMPUTE AVGREVENUE/D12.2 = TOTALREVENUE / 365; AS 'Revenew per Day' OVER
STANDARD
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK REPAGE
HEADING
"CAR BY Country <COUNTRY"
FOOTING BOTTOM
"PAGE<TABPAGENO of<TABLASTPAGE for <COUNTRY"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
END
Which will produce report similar to this :-
On the image above I have pointed out my problem with red, blue and green arrow.
Let's start with green arrow :- It should the Average sales per day so valve might be on Decimal, when it is zero like above it shows .00, is it possible to show just 0 when the value is 0 rather than .00.
Ok now moving on to Blue Arrow :- Is it possible to indent Dealer Cost, Retail Cost, Revenue per car, Sales. I found great help by Francis here:- http://forums.informationbuild...1057331/m/6397070336 But I have about 50 fields that needed to indented so using Define for that many columns will be real pain and I only want column Title to be intended.
On my third and final problem the red arrow I am having issues with Page number. As you can see FRANCE has only one page report and it should say PAGE 1 of 1 for FRANCE rather than PAGE 5. If BRITAIN has 2 page report than it should say PAGE 1 of 2 for BRITAIN and so for. I found another great help by Francis here:- http://forums.informationbuild...71057331/m/366109842 but that really didn't solved my problem.
Thank you in advance.
EDIT:- I am using WF 7.6.11, with DB2 database.This message has been edited. Last edited by: Jump_faster,
WebFOCUS 7.7. Windows Server 2008. All Outputs.
WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.
September 19, 2013, 03:42 PM
susannah
1) you set the field as /D12.2 in your fex, so you're gonna get the .2, 2) DEFINE FILE ibisamp/CAR nada/A5=' '; END TABLE FILE ... SEATS OVER nada AS '' DEALER_COST OVER ...
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
September 20, 2013, 09:47 AM
Jump_faster
Thank you Susannah
quote:
nada worked
is there any other field that I can use or work around /D12.2. I tried D12.2S but it supress all zero
WebFOCUS 7.7. Windows Server 2008. All Outputs.
WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.
September 20, 2013, 03:38 PM
Mighty Max
Search for dynamic format
DEFINE FILE CAR
REVENUE/D12.2 = RETAIL_COST - DEALER_COST;
TOTALREVENUE/D12.2 = REVENUE * SALES;
AVGREVENUE/D12.2 = TOTALREVENUE / 365;
FMT/A8= IF TOTALREVENUE EQ 0 THEN 'D12' ELSE 'D12.2';
END
TABLE FILE CAR
SUM
CAR OVER
MODEL OVER
BODYTYPE OVER
LENGTH OVER
WIDTH OVER
HEIGHT OVER
WEIGHT OVER
FUEL_CAP OVER
BHP OVER
MPG OVER
ACCEL OVER
WARRANTY OVER
SEATS OVER
DEALER_COST OVER
RETAIL_COST OVER
REVENUE AS 'Revenue per car' OVER
SALES OVER
TOTALREVENUE/FMT AS 'Total Revenew' OVER
AVGREVENUE AS 'Revenew per Day' OVER
STANDARD
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK REPAGE
HEADING
"CAR BY Country <COUNTRY"
FOOTING BOTTOM
"PAGE<TABPAGENO of<TABLASTPAGE for <COUNTRY"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
END
FMT/A8= IF TOTALREVENUE EQ 0 THEN 'D12' ELSE 'D12.2';
Worked like a charm. I really do appreciate your help.
Two down; one more to go. Do anyone have any idea how to deal with page numbering issue.
Thank you once again for all you help.
WebFOCUS 7.7. Windows Server 2008. All Outputs.
WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.
September 24, 2013, 10:35 AM
Kevin W
have you tried setting PRINTPLUS? SET PRINTPLUS = ON
WebFOCUS 7.7.05 (Someday 8) Windows 7, All Outputs In Focus since 1983.
September 24, 2013, 11:02 AM
Francis Mariani
There must be a second BY statement:
TABLE FILE CAR
SUM
CAR OVER
MODEL OVER
BODYTYPE OVER
LENGTH OVER
WIDTH OVER
HEIGHT OVER
WEIGHT OVER
FUEL_CAP OVER
BHP OVER
MPG OVER
ACCEL OVER
WARRANTY OVER
SEATS OVER
DEALER_COST OVER
RETAIL_COST OVER
COMPUTE REVENUE/D12.2 = RETAIL_COST - DEALER_COST; AS 'Revenue per car' OVER
SALES OVER
COMPUTE TOTALREVENUE/D12.2 = REVENUE * SALES; AS 'Total Revenew' OVER
COMPUTE AVGREVENUE/D12.2 = TOTALREVENUE / 365; AS 'Revenew per Day' OVER
STANDARD
BY COUNTRY NOPRINT REPAGE
BY CAR NOPRINT PAGE-BREAK
HEADING CENTER
"<COUNTRY PAGE <TABPAGENO OF <-4> <BYLASTPAGE "
ON TABLE PCHOLD FORMAT PDF
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 25, 2013, 11:06 AM
Jump_faster
Thank you for your input Kevin I tried
quote:
SET PRINTPLUS = ON
but that didn't worked.
Thank you Francis the technique that you mention worked great second by field did the trick
Thank you once again to everyone for their help.
WebFOCUS 7.7. Windows Server 2008. All Outputs.
WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.