Focal Point
Hide lines from a report

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

January 07, 2015, 08:43 AM
Abdess
Hide lines from a report
Hi, it's possible to hide lines on the report and keep only the total line ??


Thanks in advance


WebFOCUS 8.0
January 07, 2015, 09:28 AM
Rifaz
 TABLE FILE CAR
SUM DC NOPRINT RC NOPRINT SALES NOPRINT SEATS NOPRINT
BY COUNTRY NOPRINT
ON TABLE SUBFOOT
"total--->Dealer Cost<ST.DC Retail Cost<ST.RC Sales<ST.SALES Seats<ST.SEATS"
END 


You meant this?


-Rifaz

WebFOCUS 7.7.x and 8.x
January 07, 2015, 10:56 AM
Abdess
For instance this is the report :
X Y Z
1 2 3
1 2 3
1 2 3
Total 3 6 9


I want to hide the lines and the result should be like that:

X Y Z
Total 3 6 9


WebFOCUS 8.0
January 07, 2015, 12:14 PM
Rifaz
Create duplicate column names.


-Rifaz

WebFOCUS 7.7.x and 8.x
January 07, 2015, 12:34 PM
RSquared
Just do a SUM whatever ACROSS XYZ


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
January 08, 2015, 07:49 AM
Abdess
quote:
Originally posted by Rifaz:
Create duplicate column names.


quote:
Originally posted by RSquared:
Just do a SUM whatever ACROSS XYZ.


Could you explain more please ?


WebFOCUS 8.0
January 08, 2015, 09:31 AM
RSquared
Abdess,

if you post your code, we can then show you a version that could work for you.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
January 08, 2015, 09:43 AM
Tony A
Consider the following lines of code and see if you can understand what they are achieving.
DEFINE FILE GGSALES
  YEAR/YY      = DATE;
  TOTAL_TXT/A5 = 'Total';
END
TABLE FILE GGSALES
SUM DOLLARS
    BUDDOLLARS
    UNITS
    BUDUNITS
 BY REGION
WHERE YEAR EQ 1996
ON TABLE SUMMARIZE
ON TABLE SET PAGE NOLEAD
END
-RUN
TABLE FILE GGSALES
SUM DOLLARS
    BUDDOLLARS
    UNITS
    BUDUNITS
 BY TOTAL_TXT AS ''
WHERE YEAR EQ 1996
ON TABLE SET PAGE NOLEAD
END
-RUN

This is very basic stuff so I would recommend attending a training course to help you get started.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 08, 2015, 11:06 AM
Abdess
This is the code of the report:

-*component_type report
-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE HF_OPTION_COST
SUM COMPUTE Payment_Type/I8=IF HF_OPTION_COST.HF_OPTIO.COMP_PAY_DETAIL_UNIT IN ( 'B' , 'BGS' ) THEN HF_OPTION_COST.HF_OPTIO.CounTerminal ELSE IF HF_OPTION_COST.HF_OPTIO.COMP_PAY_DETAIL_UNIT EQ 'T' THEN HF_OPTION_COST.HF_OPTIO.DF_TRX_NBR ELSE IF HF_OPTION_COST.HF_OPTIO.COMP_PAY_DETAIL_UNIT EQ 'BS' THEN HF_OPTION_COST.HF_OPTIO.CounTerminal * HF_OPTION_COST.HF_OPTIO.Scheme ELSE IF HF_OPTION_COST.HF_OPTIO.COMP_PAY_DETAIL_UNIT EQ 'G' THEN 1 ; NOPRINT
COMPUTE Period_Cost/I3=IF HF_OPTION_COST.HF_OPTIO.Var_Pay_Cycle EQ 'D' THEN HF_OPTION_COST.HF_OPTIO.COUNT ELSE IF HF_OPTION_COST.HF_OPTIO.Var_Pay_Cycle EQ 'W' THEN 52 ELSE IF HF_OPTION_COST.HF_OPTIO.Var_Pay_Cycle EQ 'B' THEN 26 ELSE IF HF_OPTION_COST.HF_OPTIO.Var_Pay_Cycle EQ 'M' THEN 12 ; NOPRINT
COMPUTE Option_Bank_Cost/D12.2M=Period_Cost * Costexcltax * Payment_Type ; AS 'Total'
Var_Tac AS 'Turnover' NOPRINT
COMPUTE OptionCostBank_Cost/D12.2%=Option_Bank_Cost/Var_Tac ; AS '%'
COMPUTE Debit/D12.2M=Option_Bank_Cost/Var_Debit_Trx ;
COMPUTE Pct_Debit/D12.2%=Debit/( SUM.Var_Debit_Turnover/SUM.Var_Debit_Trx ) ; AS '% Debit'
COMPUTE Credit/D12.2M=Option_Bank_Cost/Var_Credit_Trx ;
COMPUTE Pct_Credit/D12.2%=Debit/( SUM.Var_Credit_Turnover/SUM.Var_Credit_Trx ) ; AS '% Credit'
BY HF_OPTION_COST.HF_OPTIO.COMP_ID NOPRINT
BY HF_OPTION_COST.HF_OPTIO.COMP_NAME NOPRINT
BY HF_OPTION_COST.HF_OPTIO.SHOP_ID NOPRINT
BY HF_OPTION_COST.HF_OPTIO.COMP_CK_NAME NOPRINT
BY HF_OPTION_COST.HF_OPTIO.COAD_CODE NOPRINT
BY HF_OPTION_COST.HF_OPTIO.COMP_CYCLE NOPRINT
BY HF_OPTION_COST.HF_OPTIO.COMP_UNIT NOPRINT
BY HF_OPTION_COST.HF_OPTIO.Var_Cycle NOPRINT
BY HF_OPTION_COST.HF_OPTIO.Var_Cur NOPRINT
BY HF_OPTION_COST.HF_OPTIO.COBA_CODE NOPRINT
BY Pay_mode NOPRINT
BY tax NOPRINT
BY HF_OPTION_COST.HF_COUNT NOPRINT

ON TABLE SUBTOTAL SUM. AS 'Total Cost:'
ON TABLE SET CACHELINES 100
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT='Report11', SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, PAGESIZE=A3, HFREEZE=OFF, ARGRAPHENGINE=JSCHART, $
TYPE=TITLE, COLUMN=N16, COLOR=RGB(32 0 32), BACKCOLOR=RGB(255 255 255), $
TYPE=TITLE, COLUMN=N18, COLOR=RGB(32 0 32), BACKCOLOR=RGB(255 255 255), $
TYPE=TITLE, COLUMN=N19, COLOR=RGB(32 0 32), BACKCOLOR=RGB(255 255 255), $
TYPE=TITLE, COLUMN=N20, COLOR=RGB(32 0 32), BACKCOLOR=RGB(255 255 255), $
TYPE=TITLE, COLUMN=N21, COLOR=RGB(32 0 32), BACKCOLOR=RGB(255 255 255), $
TYPE=TITLE, COLUMN=N22, COLOR=RGB(32 0 32), BACKCOLOR=RGB(255 255 255), $
TYPE=DATA, COLUMN=N16, COLOR=RGB(255 255 255), BACKCOLOR=RGB(255 255 255), $
TYPE=DATA, COLUMN=N18, JUSTIFY=LEFT, COLOR=RGB(255 255 255), BACKCOLOR=RGB(255 255 255), $
TYPE=DATA, COLUMN=N19, COLOR=RGB(255 255 255), BACKCOLOR=RGB(255 255 255), $
TYPE=DATA, COLUMN=N20, JUSTIFY=LEFT, COLOR=RGB(255 255 255), BACKCOLOR=RGB(255 255 255), $
TYPE=DATA, COLUMN=N21, COLOR=RGB(255 255 255), BACKCOLOR=RGB(255 255 255), $
TYPE=DATA, COLUMN=N22, COLOR=RGB(255 255 255), BACKCOLOR=RGB(255 255 255), $
TYPE=REPORT, OBJECT=STATUS-AREA, PAGE-LOCATION=OFF, $
ENDSTYLE
END


WebFOCUS 8.0
January 09, 2015, 01:24 PM
RSquared
Try adding a NOPRINT after all the COMPUTES.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
January 10, 2015, 09:47 AM
George Patton
I'm going to sound like a Neanderthal here. My comment isn't just for Abdess but for everyone who creates code using the GUI and then asks for help in the forum.

If you look at Tony's example, you will see that it is clear and easy to interpret. He has eliminated all of the fully-qualified field names which aren't necessary and don't contribute to understanding the problem. And there is no styling information because the question isn't about styling.

Isn't this easier to read than the original post?
quote:

TABLE FILE HF_OPTION_COST
SUM
COMPUTE Payment_Type/I8=IF COMP_PAY_DETAIL_UNIT IN ( 'B' , 'BGS' ) THEN CounTerminal
ELSE IF COMP_PAY_DETAIL_UNIT EQ 'T' THEN DF_TRX_NBR
ELSE IF COMP_PAY_DETAIL_UNIT EQ 'BS' THEN CounTerminal * Scheme
ELSE IF COMP_PAY_DETAIL_UNIT EQ 'G' THEN 1 ; NOPRINT

COMPUTE Period_Cost/I3=IF Var_Pay_Cycle EQ 'D' THEN COUNT
ELSE IF Var_Pay_Cycle EQ 'W' THEN 52
ELSE IF Var_Pay_Cycle EQ 'B' THEN 26
ELSE IF Var_Pay_Cycle EQ 'M' THEN 12 ; NOPRINT

COMPUTE Option_Bank_Cost/D12.2M=Period_Cost * Costexcltax * Payment_Type ; AS 'Total'
Var_Tac AS 'Turnover' NOPRINT
COMPUTE OptionCostBank_Cost/D12.2%=Option_Bank_Cost/Var_Tac ; AS '%'
COMPUTE Debit/D12.2M=Option_Bank_Cost/Var_Debit_Trx ;
COMPUTE Pct_Debit/D12.2%=Debit/( SUM.Var_Debit_Turnover/SUM.Var_Debit_Trx ) ; AS '% Debit'
COMPUTE Credit/D12.2M=Option_Bank_Cost/Var_Credit_Trx ;
COMPUTE Pct_Credit/D12.2%=Debit/( SUM.Var_Credit_Turnover/SUM.Var_Credit_Trx ) ; AS '% Credit'

BY COMP_ID NOPRINT
BY COMP_NAME NOPRINT
BY SHOP_ID NOPRINT
BY COMP_CK_NAME NOPRINT
BY COAD_CODE NOPRINT
BY COMP_CYCLE NOPRINT
BY COMP_UNIT NOPRINT
BY Var_Cycle NOPRINT
BY Var_Cur NOPRINT
BY COBA_CODE NOPRINT
BY Pay_mode NOPRINT
BY tax NOPRINT
BY HF_COUNT NOPRINT

ON TABLE SUBTOTAL SUM. AS 'Total Cost:'
END

What jumped out at me when I edited the code this way is the use of COUNT as a variable name (never mind the original question). COUNT is a reserved word in WebFOCUS and shouldn't be used as a variable. But it's buried in the code and us old fartz might not notice or bring it to your attention.

Also, is the following possible: SUM. ???
ON TABLE SUBTOTAL SUM. AS 'Total Cost:'


Neanderthal out ....

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
January 10, 2015, 11:43 PM
Rifaz
I do agree with George, post only what it requires, gives more attentions to your query. It's kind of debugging Wink
quote:
X Y Z
Total 3 6 9

SET PAGE=NOLEAD
TABLE FILE CAR
SUM DC NOPRINT RC NOPRINT SALES NOPRINT SEATS NOPRINT
ON TABLE SUBFOOT
"DC<+0>RC<+0>Sales<+0>Seats<+0>"
"<ST.DC<ST.RC<ST.SALES<ST.SEATS"
ON TABLE SET STYLE *
TYPE=REPORT,HEADALIGN=BODY,$
ENDSTYLE
END   



-Rifaz

WebFOCUS 7.7.x and 8.x
January 12, 2015, 05:53 AM
Abdess
quote:
Originally posted by George Patton:
I'm going to sound like a Neanderthal here. My comment isn't just for Abdess but for everyone who creates code using the GUI and then asks for help in the forum.

Neanderthal out ....




I think you forgot that you were ignorant one day, it's a little racist to say out ....

We are here to help each other and not say to people out

Thanks to all members who responded in a professional manner


WebFOCUS 8.0
January 12, 2015, 10:53 AM
Tony A
quote:
it's a little racist

Don't think so? Perhaps it's one of interpretation?

I read George's post as suggesting to all (not just yourself) that it is in the interests of speedier responses if the original question contains only the salient facts - and not confused with things such as styling code etc. when the question isn't about styling.

It also suggests removing fully qualified names on the fields so that the code is clear and concise. It certainly helps in spotting reserved words as George pointed out.

As I say, I think the way George responded was helpful and not at all discrimatory.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 12, 2015, 11:45 AM
Rifaz
I too agreed with George, am i also in that crew? lol Wink

I too have similar thoughts in the beginning but I're wrong. People here more experienced and really helpful. I can't even imagine how WebFOCUS developer would be without focalpoint.

Welcome to the focalpoint Abdess!!!


-Rifaz

WebFOCUS 7.7.x and 8.x
January 12, 2015, 11:46 AM
Tom Flynn
We opened and read The Manual...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
January 13, 2015, 12:15 PM
Kevin W
I think this is just a misunderstanding of English slang. First off, he called himself a Neanderthal (because he has been using Focus/WebFocus since the stone age). "Neanderthal out" is a phrase from the old days of two-way radio. He was signing off (saying he was leaving the converstaion). He wasn't saying that someone else should leave the FocalPoint discussion. Finally, he is correct that you should do your homework before posting here. Also please post condensed (but potentially executable code) so we don't have to scroll through a lot of extra lines.


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.
January 13, 2015, 12:36 PM
George Patton
Thanks for all the support !

quote:
"Neanderthal out" is a phrase from the old days of two-way radio.

Actually the "old days" are still with us. I'm a licensed pilot and "Golf Alpha Yankee India out" would be a standard, recognised (although in truth not regularly used) way for me end a conversation with an air traffic controller .... (My aircraft registration is C-GAYI). Mostly we just say "Thanks and have a good day, eh! "


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP