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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]using PRINT with OVER and SUM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]using PRINT with OVER and SUM
 Login/Join
 
Gold member
posted
Hi All,

I have used a OVER and ACROSS in the code.. I need to PRINT one more field which I am unable to do. My current code, output and expected output I have given below.

 
TABLE FILE xxx
SUM
METRIC1 AS Number_of_Homes_Passed
OVER
METRIC2 AS Number_of_Subscribers
BY FRANCHISE_NAME NOPRINT
ACROSS MONTH_SORT NOPRINT
ACROSS ONEMONTHBACK AS ''
ON TABLE SUBHEAD
" "
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &disp
-*ON TABLE SET WEBVIEWER ON
ON TABLE SET WEBVIEWTARG OFF
-*ON TABLE SET CACHELINES 100
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=OFF,
     ORIENTATION=PORTRAIT,
	 JUSTIFY=CENTER,
	 LEFTMARGIN=0.500000,
     RIGHTMARGIN=0.500000,



My output looks like the following

   

                          Sep-16   Oct-16    Nov-16
Number_of_Homes_Passed     1303     1303      1296 
Number_of_Subscribers       63       68       464 


Now I need to include one more field called rolling3 here as the average of rolling 3 months which I am unable to do.. shown the required output below.I am confused on how to attain this result.

               Rollin3  Sep-16   Oct-16    Nov-16
Home_passed     1300     1303     1303      1296 
Subscribers     198       63       68       464 


Thanks,
Ramya
WebFOCUS 8105, HTML, Javcascript

This message has been edited. Last edited by: <Emily McAllister>,
 
Posts: 73 | Registered: January 02, 2012Report This Post
Virtuoso
posted Hide Post
hi Ramya,

When trying to display sample as you do, you can also use the code tag, you will then be able to have your "data" properly aligned which makes the reading easier.

What I do suggest it first try to accomplish your need WITHOUT the OVER command. Once you'll have all your data in a "regular" format it will become much more easy to then add the OVER.


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: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
Hi Martin,

Thanks for the input. I have included the code tag for the sample output and it looks good now.

I will try the way you have suggested and will let you know..

Thanks once again

Ramya
WebFOCUS 8105, HTML, Javcascript
 
Posts: 73 | Registered: January 02, 2012Report This Post
Virtuoso
posted Hide Post
Ramya,
Here is a solution using the CAR file:
  
-* File Ramya.fex

TABLE FILE CAR
SUM
   RETAIL
   DEALER
BY SEATS
ON TABLE HOLD
END
-*
FILEDEF HOLD DISK HOLD.FTM (APPEND
-*
DEFINE FILE HOLD
SEAT0/I3=0;
END
TABLE FILE HOLD
SUM
AVE.RETAIL
AVE.DEALER
BY SEAT0
ON TABLE SAVB AS HOLD
END
-*
DEFINE FILE  HOLD
ONEMONTH/A12=DECODE SEATS(0 'Rollin3' 2 'Sep-16'  4 'Oct-16'   5 'Nov-16');
END
TABLE FILE HOLD
SUM
   RETAIL AS Homes_Passed
   OVER
   DEALER AS Subscribers
ACROSS SEATS NOPRINT
ACROSS ONEMONTH AS ''
END

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Gold member
posted Hide Post
Daniel,

That's the great idea, which I have never thought of. That seems perfect. I will use the same logic in my piece of code to accomplish my requirement.

Thanks so much,
Ramya
WebFOCUS 8105, HTML, Javascript
 
Posts: 73 | Registered: January 02, 2012Report 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]using PRINT with OVER and SUM

Copyright © 1996-2020 Information Builders