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     [WORKAROUND] Report using COMPUTE after an Across and OVER

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[WORKAROUND] Report using COMPUTE after an Across and OVER
 Login/Join
 
Platinum Member
posted
Hi,

Below is a sample code of a report that I'm trying to produce with a COMPUTE using the columns after the ACROSS.
But once I do that, the columns get all mis-aligned and the OVER column titles does not display.

Has anyone encountered this problem before?

TABLE FILE CAR
WHERE BODYTYPE EQ 'COUPE' OR 'ROADSTER' OR 'SEDAN'
SUM
SALES OVER
DEALER_COST OVER
RETAIL_COST
BY CAR
ACROSS BODYTYPE
-* I want to do some calculations with the columns and display it after the across for each car type
-*COMPUTE ASDF/D12.2 = (C1+C3+C6+C9)/C9*100;
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END



Thanks in advance.

Best Regards,

Jimmy Pang

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


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Guru
posted Hide Post
Hi,

You could try using

TABLE FILE CAR
WHERE BODYTYPE EQ 'COUPE' OR 'ROADSTER' OR 'SEDAN'
SUM
SALES
DEALER_COST
RETAIL_COST
BY CAR
ACROSS BODYTYPE
COMPUTE TOTAL/D12.2 = (C1+C3+C6+C9)/C9*100;
END

This will create one total column. I'm not sure what you mean by car type, is it for each CAR or for each BODYTYPE?


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Expert
posted Hide Post
The OVER commands are messing up the report layout. I don't think OVER and ACROSS play well together.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Thanks for your quick response Frans.

What I meant was for each Car (eg. ALFA ROMEO, AUDI, BMW, etc).

It is now aligned for the COMPUTE column after the ACROSS, but is there a way to have the SALES, DEALER_COST, and RETAIL_COST display vertially per CAR and BODY TYPE

eg. with arbitrary data

BODYTYPE
CAR COUPE SEDAN CALCFIELD
AUDI SALES 12300 15000 33.15
DEALER_COST 12545 25333
RETAIL_COST 12121 30000


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by Francis Mariani:
The OVER commands are messing up the report layout. I don't think OVER and ACROSS play well together.


Thanks, but the weird part is that the code works in mainframe focus and the column titles align properly.

It was until I put the program into webfocus that this error occur.


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Guru
posted Hide Post
I see what you mean, the COMPUTE TOTAL is messing up the layout. Seems like a bug to me.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
Had time to play a little, I think it is definitely a mainframe versus web issue, this gives a report of sorts, but is the caluclated figure valid, I didn't check?

TABLE FILE CAR
WHERE BODYTYPE EQ 'COUPE' OR 'ROADSTER' OR 'SEDAN'
SUM SALES NOPRINT
DEALER_COST NOPRINT
RETAIL_COST NOPRINT
ACROSS BODYTYPE NOPRINT
BY CAR 
SUM 
SALES  OVER
DEALER_COST  OVER
RETAIL_COST  
ACROSS BODYTYPE
BY CAR
COMPUTE ASDF/D12.2 = (C1 + C2 + C3)/ (C3 * 100);
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END
  


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Hi Leah,

Thanks for your input.

The solution you gave solves alignment problem.

The calculation is correct too, but the calculated value is now at the bottom of each car, and not the next column after the ACROSS.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Platinum Member
posted Hide Post
Thank you all for your help/suggestions.

I was able to use the alternative, by removing the OVER from the report.

Although it doesn't display the OVER feature, at least the columns are aligned and the COMPUTE fields are displaying correctly.

Thanks again for your help.


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report 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     [WORKAROUND] Report using COMPUTE after an Across and OVER

Copyright © 1996-2020 Information Builders