Focal Point
[SOLVED] Text for the Word "Total" on a Different Line than the Numbers

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8571057842

September 26, 2007, 12:57 PM
gcarelse
[SOLVED] Text for the Word "Total" on a Different Line than the Numbers
Hello,

I created two reports with Total lines that are quite similar. One looks correct, but the other one has the word "Total" on one line at the bottom, and then the total numbers on a line below it. This is also not attached to the table above it. Any ideas what is going on?

This message has been edited. Last edited by: FP Mod Chuck,


Grant
Oracle 9, Web Focus Version 7.6.1
September 26, 2007, 01:02 PM
Sayed
Can you upload your code? Maybe a sample with CAR file?


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
September 26, 2007, 01:08 PM
Francis Mariani
"Any ideas what is going on?" - This question has been addressed dozens of times on the forum.

My first guess is that you have a BY fieldname1 NOPRINT before the field that has a BY fieldname2 SUBTOTAL.

It is an EXTREMELY annoying behaviour of WebFOCUS.

Start by reading this:

How to avoid total line on two lines - Mainly for Kerry


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 26, 2007, 03:33 PM
gcarelse
Hello,

Here is some sample code:

-DEFAULT &INDATE = 'PREMONTH'
-DEFAULT &FMT = 'PDF'
ENGINE SQLORA SET SERVER OSPHD_PROD
ENGINE SQLORA EX SP_CR_GET_MONTHLYINJ_QBYTEINJ '&INDATE';
-RUN
TABLE FILE SQLOUT
PRINT
YEAR
MONTH
PAD
WELL_NAME
WELL_UWI
INJECT_HOURS
AVERAGE_PRESSURE AS A_PRESSURE
INJECT_STEAM
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS MVO_HOLD FORMAT ALPHA
END

DEFINE FILE MVO_HOLD ADD
NEWYEAR/YY = EDIT(YEAR,'9999');
NEWMONTHL/Mtr = EDIT(MONTH,'99');
END

TABLE FILE MVO_HOLD
PRINT
PAD AS 'PAD'
WELL_NAME AS 'Well Name'
WELL_UWI AS 'Well UWI'
INJECT_HOURS/D12 AS 'Hours on Steam Inj'
A_PRESSURE/D12.2 AS 'Average Pressure'
INJECT_STEAM/D12.2 AS 'Steam (m3 CWE)'
ON TABLE SUBHEAD
" <+0>Mackay River Facility - Monthly Injection Report"
"Report <+0>For HEADING
"RPT-M1901D, MINJ Version 2.0"
"Generated <+0>&DATEtMDYY <+0> "
ON TABLE SET EMPTYREPORT ANSI
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'Total' INJECT_STEAM
ON TABLE PCHOLD FORMAT '&FMT'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=CM,
PAGESIZE='Letter',
LEFTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,

I do not have any "BY" columns, and am only bringing back the total of one column, so I don't see how this can exceed the width of the page.


Grant
Oracle 9, Web Focus Version 7.6.1
September 26, 2007, 03:37 PM
Tom Flynn
quote:
"Report <+0>For HEADING
"RPT-M1901D, MINJ Version 2.0"


No, BUT, this heading sure will!!!!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
September 26, 2007, 03:45 PM
gcarelse
That section seemed to have pasted incorrectly from my source code. Here is an edited version:

ON TABLE SUBHEAD
" <+0>Mackay River Facility - Monthly Injection Report"
"Report <+0>For VARIABLE1 VARIABLE2"
HEADING
"RPT-M1901D, MINJ Version 2.0"
"Generated <+0>&DATEtMDYY <+0> "


Grant
Oracle 9, Web Focus Version 7.6.1
September 26, 2007, 03:58 PM
Francis Mariani
Tom is suggesting that there's an end double-quote missing in your SUBHEAD line 2.

Subheadings and heading will not be the cause of the Subtotal splitting into two.

Here's your code made executable by anyone by using the CAR file, and the Subtotal gets split into two. There's one or two experts in the forum that might be able to fix this. It might be because there's no BY statements at all.

TABLE FILE CAR
PRINT
SEATS AS 'PAD'
CAR AS 'Well Name'
COUNTRY AS 'Well UWI'
DEALER_COST/D12 AS 'Hours on Steam Inj'
RETAIL_COST/D12.2 AS 'Average Pressure'
WHEELBASE/D12.2 AS 'Steam (m3 CWE)'
ON TABLE SUBHEAD
" <+0>Mackay River Facility - Monthly Injection Report"
"Report <+0>For"
HEADING
"RPT-M1901D, MINJ Version 2.0"
"Generated <+0>&DATEtMDYY <+0> "
ON TABLE SET EMPTYREPORT ANSI
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'Total' WHEELBASE
-*ON TABLE PCHOLD FORMAT '&FMT'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=CM,
PAGESIZE='Letter',
LEFTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,$
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 26, 2007, 04:21 PM
Spence
this will put the total on one line.

SET BYDISPLAY=ON
DEFINE FILE CAR
SEATS/A15 = SEATS;
END
TABLE FILE CAR
PRINT
-*SEATS AS 'PAD'
CAR AS 'Well Name'
COUNTRY AS 'Well UWI'
DEALER_COST/D12 AS 'Hours on Steam Inj'
RETAIL_COST/D12.2 AS 'Average Pressure'
WHEELBASE/D12.2 AS 'Steam (m3 CWE)'
BY SEATS AS 'PAD'
ON TABLE SUBHEAD
" <+0>Mackay River Facility - Monthly Injection Report"
"Report <+0>For"
HEADING
"RPT-M1901D, MINJ Version 2.0"
"Generated <+0>&DATEtMDYY <+0> "
ON TABLE SET EMPTYREPORT ANSI
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'Total' WHEELBASE
-*ON TABLE PCHOLD FORMAT '&FMT'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=CM,
PAGESIZE='Letter',
LEFTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,$
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
September 26, 2007, 04:39 PM
Francis Mariani
The DEFINE SEATS causes an error because you cannot convert integer SEATS to alpha without EDIT,

but,

your example works without the DEFINE. The BY SEATS causes the SUBTOTAL line to print on one line.

What if you didn't want the report in SEATS order?


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 26, 2007, 05:43 PM
Darin Lee
The underlying problem is space allocation which exhibits itself when using BY field noprint. If there is not enough "space" in the left-most column(s) to print the subtotal label along with the total for that column, it splits the total line with the label on one line and the totals on the next. Basically, if the first field is shorter than about 8-10 characters, you'll get the split when using totals, regardless of whether or not you have a BY field.
My common fix is to define DUMMY_FIELD/A8=''; and make then BY DUMMY_FIELD AS '' (or with PRINT make it the first field using AS ''.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 06, 2018, 11:48 PM
Joao
the solution to this issue can be found at the link: https://www.informationbuilder...scriptions-same-line