Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] how put a sales to the right of across total
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] how put a sales to the right of across total
 Login/Join
 
Silver Member
posted
Hello,

I am trying to create a report where I want to put some fields right of a across total. Can someone please help me?

here is a sample code using the car file where the sales is left of the across data. I want to be able to put "the total sales" to be right side "the total of seats".


TABLE FILE CAR
SUM
CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
SUM
CAR.BODY.SEATS
BY CAR.ORIGIN.COUNTRY
ACROSS LOWEST CAR.COMP.CAR ACROSS-TOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END

thanks,

Vera

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


WebFOCUS 8.2.0.3,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
 
Posts: 40 | Registered: September 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Vera.

Try with RECAP command after ACROSS:

TABLE FILE CAR

SUM 
CAR.BODY.SALES NOPRINT
BY CAR.ORIGIN.COUNTRY

SUM 
CAR.BODY.SEATS
BY CAR.ORIGIN.COUNTRY
ACROSS LOWEST CAR.COMP.CAR ACROSS-TOTAL
RECAP TOTSALES/D15 = C1 ;
-* C1 refers to the sales of first SUM verb.

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $
END


Regards. Mikel.


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Reply With QuoteReport This Post
Silver Member
posted Hide Post
It works. thank Mikel.

I have added a column-total by in some cases I do not want the RECAP columns (in this case seats) not to be calculated. I tried to just total the columns I want but it is not working. Does someone know to do it?

here is the complete code:

TABLE FILE CAR
SUM
CAR.BODY.SALES NOPRINT
BY CAR.ORIGIN.COUNTRY
SUM
CAR.BODY.SEATS
BY CAR.ORIGIN.COUNTRY
ACROSS LOWEST CAR.COMP.CAR ACROSS-TOTAL
RECAP TOTSALES/D15 = C1 ;

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE COLUMN-TOTAL AS 'TOTAL' 'CAR.BODY.SEATS'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END

thanks,
Vera


WebFOCUS 8.2.0.3,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
 
Posts: 40 | Registered: September 30, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
I have added a column-total by in some cases I do not want the RECAP columns (in this case seats) not to be calculated

This is not clear what you are asking.

You don't want the Seats total but want the Sales at the right ?

Use Mikel sample but without the word ACROSS-TOTAL

If still not what you're asking, provide a data output sample (don't forget to use the code tag. It will keep your sample alignment and make it easier to read)


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: 2330 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Silver Member
posted Hide Post
in the column-total line (ON TABLE COLUMN-TOTAL AS 'TOTAL' 'CAR.BODY.SEATS' ),I do want the seats to totaled but not the sales. In my real sample report instead of sales I have Average cost.

Sorry to ask but how can I do the code-tag?

thanks


WebFOCUS 8.2.0.3,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
 
Posts: 40 | Registered: September 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi again.

Firstly, if you work with computed statistical variables (Percentages, averages...) consider using RECOMPUTE or SUMMARIZE instead of COLUMN-TOTAL.

In the example, depending what do you want to sum, use case 1 (SUMMARIZE), 2 (SUMMARIZE SEATS), 3 (SUMMARIZE C3, based on RECAP output order):

TABLE FILE CAR
SUM
CAR.BODY.SALES NOPRINT
BY CAR.ORIGIN.COUNTRY
SUM
CAR.BODY.SEATS
BY CAR.ORIGIN.COUNTRY
ACROSS LOWEST CAR.COMP.CAR ACROSS-TOTAL
RECAP TOTSALES/D15 = C1 ;

-* 1. Summarize all
-* ON TABLE SUMMARIZE AS 'Total'
-* Summarize SEATS AND Recap TOTSALES
-* ON TABLE SUMMARIZE SEATS C3 AS 'Total'

-* 2. Summarize only Seats
-* ON TABLE SUMMARIZE SEATS AS 'Total' 

-* 3. Summarize only Recap TOTSALES
ON TABLE SUMMARIZE C3 AS 'Total' 

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,$
END



And finally... "use the code tag" means publish the code between tags. Yo can use the last tool icon provided in post window. Wink

Regards. Mikel


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Sorry to ask but how can I do the code-tag?

Last icon on the ribbon
</>


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: 2330 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Silver Member
posted Hide Post
thank you so much.

The issue is that there is a bug in A/S 8.1.0.5


WebFOCUS 8.2.0.3,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
 
Posts: 40 | Registered: September 30, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I have ran above sample in WF8105M and it work well.

Which gen you have ?


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: 2330 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Silver Member
posted Hide Post
8.1.0.5 (2015)


WebFOCUS 8.2.0.3,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
 
Posts: 40 | Registered: September 30, 2015Reply With QuoteReport This Post
Silver Member
posted Hide Post
Gen Number 858


WebFOCUS 8.2.0.3,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
 
Posts: 40 | Registered: September 30, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Go to your Client and then select Help / About WebFocus then look at Build/GEN Number

And as for the ReportingServer it's under Help / Version and Gen Number.

But if you don't have the proper result as we have from the sample code, you may need to open a case with TechSupport


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: 2330 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] how put a sales to the right of across total

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.