Focal Point Banner


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 myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to hide entre row....

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to hide entre row....
 Login/Join
 
Gold member
posted
Hello,
In my Report I used file more option to print the first row for summary line and using the summary line for calculation . The user don't want to see the summary line and just want to see detail line. I appreciate any one have thoughts on this issue....

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 73 | Registered: April 06, 2016Report This Post
Virtuoso
posted Hide Post
Could you provide a simple example of what you have right now? I'm not sure if I understand quite what's required.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
Normally to remove a row you should use a WHERE clause.

One way I think that you should resolve your issue may be by HOLDing the result data meaning that instead of doing a report once your data is all calculated HOLD it to then print it from another TABLE FILE.
But I may have miss something since your requirement is not much detailed.

Or you may use multi-verb TABLE FILE instead. It could be an option.
below sample is calculating the ratio of RETAIL_COST on total DEALER_COST per COUNTRY.
TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY COUNTRY

SUM COMPUTE RATE/D8.2C = RETAIL_COST / C1;
    RETAIL_COST
BY COUNTRY
BY CAR
END


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, 2013Report This Post
Gold member
posted Hide Post
Hello,
Please see the sample of the car file . I am using first row for calculation the user don't want to see the summary line. Please let me know if you have any other suggestion to hide the first row....

 TABLE FILE CAR
SUM
COMPUTE ZSORT/A2 = 'A';
DEALER_COST
BY COMPUTE CAR/A170 = '';
ON TABLE HOLD AS FACHS3A2
END
-RUN

TABLE FILE CAR
SUM
COMPUTE ZSORT/A2 = 'B';
DEALER_COST
COUNTRY
BY CAR/A170
ON TABLE HOLD AS FACHS3B2
END
-RUN

SET BYDISPLAY = ON

TABLE FILE FACHS3A2
SUM
DEALER_COST
BY ZSORT
BY CAR
ON TABLE HOLD AS TESTING 
MORE
FILE FACHS3B2
END
TABLE FILE TESTING
SUM
DEALER_COST
COMPUTE TEST1/D12= IF CAR EQ '' THEN 1;
COMPUTE TEST2/D12= IF TEST1 EQ 1 AND ZSORT EQ 'A' THEN DEALER_COST;
COMPUTE TEST3/D12=DEALER_COST/TEST2 * 100;
BY ZSORT
BY CAR
END
-RUN
 


WebFOCUS 8
Windows, All Outputs
 
Posts: 73 | Registered: April 06, 2016Report This Post
Virtuoso
posted Hide Post
Same sample as already provided with little changes
DEFINE FILE CAR
DUMMY /A1 = '';
END
TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY DUMMY NOPRINT

SUM DEALER_COST
    COMPUTE RATE/D12 = DEALER_COST / C1 * 100;
BY DUMMY NOPRINT
BY CAR
END
-RUN


Or from your own sample as I also already suggested
TABLE FILE CAR
SUM COMPUTE ZSORT/A2 = 'A';
    DEALER_COST
BY COMPUTE CAR/A170 = '';
ON TABLE HOLD AS FACHS3A2
END
-RUN

TABLE FILE CAR
SUM COMPUTE ZSORT/A2 = 'B';
    DEALER_COST
    COUNTRY
BY CAR/A170
ON TABLE HOLD AS FACHS3B2
END
-RUN

SET BYDISPLAY = ON

TABLE FILE FACHS3A2
SUM DEALER_COST
BY ZSORT
BY CAR
ON TABLE HOLD AS TESTING 
MORE
FILE FACHS3B2
END
-RUN

TABLE FILE TESTING
SUM DEALER_COST
    COMPUTE TEST1/D12= IF CAR EQ '' THEN 1;
    COMPUTE TEST2/D12= IF TEST1 EQ 1 AND ZSORT EQ 'A' THEN DEALER_COST;
    COMPUTE TEST3/D12=DEALER_COST/TEST2 * 100;
BY ZSORT
BY CAR
ON TABLE HOLD AS RPTDATA
END
-RUN

TABLE FILE RPTDATA
SUM DEALER_COST
    TEST3
BY ZSORT
BY CAR
WHERE CAR NE '';
END
-RUN


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, 2013Report This Post
Master
posted Hide Post
Just run your first hold, then do a -READFILE to store the total as a parameter. You can then use the parameter in your calculations.
  
TABLE FILE CAR
SUM
DEALER_COST
ON TABLE HOLD AS FACHS3A2
END
-RUN
-READFILE FACHS3A2

SET BYDISPLAY = ON

TABLE FILE CAR
SUM
DEALER_COST
COMPUTE TEST1/D12= IF CAR EQ '' THEN 1;
COMPUTE TEST2/D12= &DEALER_COST.EVAL;
COMPUTE TEST3/D12= DEALER_COST/&DEALER_COST.EVAL * 100;
BY CAR
END
-RUN


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Expert
posted Hide Post
So essentially you are trying to calculate the percentage each line represents of the whole?

So the simplest method is to do a single pass of the data aggregating the values at the correct level before using them within your "TEST3" COMPUTE -
TABLE FILE CAR
SUM
DEALER_COST WITHIN TABLE NOPRINT
DEALER_COST WITHIN CAR
COMPUTE TEST3/D12=C2/C1 * 100;
BY CAR
END
-RUN

Essentially the same as Martin's first example with the newer method without using a multi verb request.

T

This message has been edited. Last edited by: Tony A,



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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
quote:
Originally posted by Tony A:
So essentially you are trying to calculate the percentage each line represents of the whole?

So the simplest method is to do a single pass of the data aggregating the values at the correct level before using them within your "TEST3" COMPUTE -
TABLE FILE CAR
SUM
DEALER_COST WITHIN TABLE NOPRINT
DEALER_COST WITHIN CAR
COMPUTE TEST3/D12=C2/C1 * 100;
BY CAR
END
-RUN

Essentially the same as Martin's first example with the newer method without using a multi verb request.

T


For that matter, you can just use TOT. in your COMPUTE
TABLE FILE CAR
SUM DEALER_COST
COMPUTE TEST3/D12 = DEALER_COST / TOT.DEALER_COST * 100;
BY CAR
END  

This message has been edited. Last edited by: Hallway,


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Gold member
posted Hide Post
Thank you all your input...


WebFOCUS 8
Windows, All Outputs
 
Posts: 73 | Registered: April 06, 2016Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to hide entre row....

Copyright © 1996-2020 Information Builders