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.
hi ppl, In my CROSS_TAB report , we have to find the count and percentage count of applications..In the last two columns i have to find the sum of the count and average of the percentage-count...But when i use the clause ON TABLE ROW-TOTAL, it adds the percentage-count and displays the wrong output..please advice..ur help will be really appreciated below s my procedure code thank you
TABLE FILE T_ORA_APPL_PLN_V SUM NO_OF_APPLICATIONS/I8 AS '# Of Applications' PCT.NO_OF_APPLICATIONS AS '% Of Applications' BY LIFECYCLE_STAGE ACROSS PRIMARY_BPO AS '' ON TABLE SUBHEAD "APPLICATION PORTFOLIO PLANNING REPORT 1" ON TABLE SET PAGE-NUM OFF ON TABLE ROW-TOTAL AS 'TOTAL' ON TABLE COLUMN-TOTAL AS 'APPLICATIONS THAT SUPPORT MULTIPLE BPO''S' NO_OF_APPLICATIONS ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
You would use SUMMARIZE in place of COLUMN-TOTAL, but I'm not sure how that translates to ROW-TOTAL. You could use a multi-verb like the following:
TABLE FILE CAR
SUM SEATS PCT.SEATS/D8.2
BY COUNTRY
SUM SEATS PCT.SEATS/D6.2
BY COUNTRY
ACROSS CAR
ON TABLE NOTOTAL
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=N2, SEQUENCE=100,$
TYPE=REPORT, COLUMN=N3, SEQUENCE=101,$
ENDSTYLE
END
I've thrown some large sequence number in the style sheet to make them appear at far right, so it looks the same as if it were a column-total which, in actuality, it is.
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
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
hi lee, thanks a lot ..the solution works , but i have a question...i am testing this program using a dummy database..but in real time scenario where there are around 500 columns..will the sequence keyword work..i want the columns N2 and N3 to be positioned at the last permanently irrespective of amount of data..and any formatting issues..
You can change the sequence numbering from 100 to 9000 if you like. That way the fields will more or less permanently stay at the right side of the report. You can't specify a relative position (like left, center, right or any other term), only absolute ones. So choose a large enough number so that it will be always right positioned.
Hope this helps ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
sir, even though i am getting the output..but when i open the report in Developer Studio tool..the sequence keyword does not work and there are lot of formatting issues......please adviceThis message has been edited. Last edited by: arvind,
DEFINE FILE CAR SEATS_D/D8=SEATS; END TABLE FILE CAR SUM PCT.SEATS_D/D8.2 NOPRINT BY COUNTRY SUM SEATS PCT.SEATS_D/D8.2 WITHIN TABLE BY COUNTRY ACROSS CAR COMPUTE TOTONE/D8.2=C01; ON TABLE COLUMN-TOTAL ON TABLE SET STYLE * ENDSTYLE END
By the way, did you use to work at the Postal Service HQ in Washington DC?
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
hi mickey, i am still getting the same output...i want the total count and its corresponding percentage column at the last..they are appearing in the first two places
Incidentally, I do understand what you are trying to do. The code I posted using the CAR file puts the total count and percentage columns on the right. Did you run the code I posted?
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
DEFINE FILE CAR SEATS_D/D8=SEATS; END TABLE FILE CAR SUM SEATS PCT.SEATS_D/D8.2 WITHIN TABLE BY COUNTRY ACROSS CAR ACROSS-TOTAL ON TABLE COLUMN-TOTAL ON TABLE SET STYLE * ENDSTYLE END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
One last example. I reread your original post and the problem is that you are trying to calculate a percent and then take an average of the percent values and show that in the total column on the right.
This should do it for you:
SET HOLDLIST=PRINTONLY SET ASNAMES =ON DEFINE FILE CAR SEATS_D/D8=SEATS; END TABLE FILE CAR SUM SEATS_D AS 'CNTSEATS' PCT.SEATS_D/D8.2 AS 'PCTSEATS' WITHIN TABLE BY COUNTRY BY CAR ON TABLE HOLD AS STEPONE END -RUN TABLE FILE STEPONE SUM CNTSEATS NOPRINT AVE.PCTSEATS NOPRINT BY COUNTRY SUM CNTSEATS PCTSEATS BY COUNTRY ACROSS CAR COMPUTE TOTSEATS/D8=C01; COMPUTE AVESEATS/D8.2=C02; END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
mickey , thank you so much for your help..but i am afraid the output still does not fulfill the requirements ...below is the layout if the output...
CAR
 ALFA-ROMEO  BMW   TOTAL  CNT PCT CNT PCT CNT PCT
COUNTRY ENGLAND   8 100  6 50 14 70 FRANCE  6   50   6 30 ITALY JAPAN TOTAL 8 12 20
thank you very much mickey your help is appreciated sorry i am not able to align the table properly i will explain the output..total row is the total count ..so in the first column it is 8..in the second column it is 6 +6 = 12 and the corresponding PCTs are 50 and 50 bcoz 6/12*100 = 50..finally in the total column we have the total count and its corresponding percentage.. which is 14/20*100=70 ,, and 6/20*100=30.. mickey, sorry about the maths calculations i know i sound weird..but just to avoid any misunderstandings
thanks a lot sirThis message has been edited. Last edited by: arvind,
even though i am getting the output..but when i open the report in Developer Studio tool..the sequence keyword does not work and there are lot of formatting issues......please advice
If this code works for you, my advice is to forget about opening it in DevStudio GUI. You will find that there are many things that the underlying FOCUS code will understand and function properly that the GUI doesn't know hoow to handle. I work mostly in the code so I don't run into the issue as often, but it happens.
If you need to, stay in the GUI until you get your columns, computes, etc. the way you need them. Then open with text editor and make the changes to match the above including the stylesheet SEQUENCE commands. From that point on, don't go back to the GUI - it will get confused and changed things to what it "thinks" they should be.
I'm not knocking the GUI - it's great for a lot of things - but from years of experience this is what I've found to work. That's what we get for having such a powerful language that's been around for a long time, and now we're trying to GUi-ize it.
quote:
but in real time scenario where there are around 500 columns
500 columns??!! eek!! But as Gamp suggests, just change the Sequence values to larger numbers like 9000 and 9001
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
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I guess I do not understand the final result of what you are trying to get. I understand the format but I do not understand what you want the percentages to look like. I thought I understood after reading your original post again but I guess I don't.
Sorry if I am confusing the issue more than helping.
Maybe if you post what the results SHOULD look like and then we can help you from there.
Does your last post indicate what you want to show or NOT what you want to show?
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
hi mickey , lee thank you so much for helping me..i got the required output..but i am facing a formatting issue..i am not able to format the last two compute columns in the report output..they are sort of detached from the rest of the report..i have pasted the screenshot of the output in www.tinypic.com . below is the link
Thank you so much , your help is really appreciated
I don't know what you've already tried - you might post the code you have now and we'll go from there.
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
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
DEFINE FILE T_ORA_APPL_PLN_V SALESD/D15 = NO_OF_APPLICATIONS; SALESX/D15= NO_OF_APPLICATIONS; NOTA/D12.2 = SALESX; PCNT/D12.2 = PCT.SALESX; END TABLE FILE T_ORA_APPL_PLN_V SUM SALESX NOPRINT COMPUTE PCNTS/D12.2 = ( SALESX / TOTAL_NO_APPS ) * 100; NOPRINT BY LIFECYCLE_STAGE SUM SALESD AS '# OF APPLICATIONS' COMPUTE PCNTA/D12.2 = ( SALESX / TOTAL_NO_APPS ) * 100; AS '% OF APPLICATIONS' BY LIFECYCLE_STAGE ACROSS PRIMARY_BPO AS '' COMPUTE NOTA/D12.2 = SALESX; AS 'Total' COMPUTE PCNT/D12.2 = PCNTS; AS ' Total' ON TABLE SUBHEAD "APPLICATION PORTFOLIO PLANNING REPORT 1" ON TABLE SET PAGE-NUM OFF ON TABLE COLUMN-TOTAL AS 'APPLICATIONS THAT SUPPORT MULTIPLE BPO''S' SALESX SALESD ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, LEFTMARGIN=0.500000, RIGHTMARGIN=0.500000, TOPMARGIN=0.500000, BOTTOMMARGIN=0.500000, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $ TYPE=REPORT, BORDER=LIGHT, FONT='ARIAL', SIZE=10, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, TOPGAP=0.013889, BOTTOMGAP=0.027778, $
Where is the rest of your styling coming from? There are no grays or reds or anything in the code you posted. Did you try adding styling to the specific columns as I mentioned in my last post?
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
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
hi lee, i tried your concept of using Sequence. the output is coming perfectly , but again i am facing a new formatting issue. i have a long text in the subtotal row " Applications that Support Multiple BPO's ". Its not getting wrapped and its looking awkward. i have posted the screenshot here. i hope it s helpful .
In the screen shot you posted the text IS wrapping. Also, when you post code, Disable the HTML. You do this by clicking the words "options" and then selecting the check box next to Disable HTML. Please edit your post with the code and Disable the HTML.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
hi mickey , i checked the disable HTML option..i am not able to align the grandtotal text " Applications that Support Multiple BPO's ".. as you can see in the screenshot ..Any suggestions please .. thank you very much
You are experiencing the issue of have a grand total AS text that is too long compared to the length of the SORT values.
Do a search on the forum about SUBTOAL on two lines to see an explaination of why this happens.
To fix this, create a DEFINE FIELD of a length of A40 equal to LIFECYCLE_STAGE and then sort your report BY the DEFINE FIELD instead of LIFECYCLE_STAGE.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
hi mickey I tweaked the code a bit to avoid this error..I used your concept of using define field for Lifecycle_stage and it is still not working..below is the modified code.
I am getting another formatting issue.The last two compute columns are totally isolated from the rest.I am not able to change the font or the backcolor of the last two columns. The thing is the font change of last two columns is getting reflected in PDF , EXL2K but not in HTML..Any suggestions please ?? thank you sir
It is very strange that the formatting works with PDF and Excel but not with HTML. I do not have any ideas at this point.
If you cannot debug it yourself I suggest opening a case with IBI to get there assistance since this might be a bug that needs their attention. This is my best guess at this point.
Sorry I cannot be of further assistance.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003