Focal Point
[SOLVED] doubt on across behaviour

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3787050286

April 28, 2016, 03:09 AM
glezo
[SOLVED] doubt on across behaviour
Hello!

First of all, I hope you guys will forgive me, for I am quite newbie in WebFOCUS technology.
I have a doubt related to the across behaviour. We have developed a moderetely complex report, in which sometimes, in runtime, we display one SUM column with across, and sometimes two or more SUM columns. When two or more columns are displayed in the verb, the SUM columns title are gently displayed. Yet, when only one column is displayed, there is no title for that column, and we need to display it.

We have managed to reproduce the two different behaviours in these TABLE FILE from table CAR:
(runned in WebFOCUS server 8.0.08)

-SET &ECHO='ALL';

TABLE FILE CAR
HEADING
"CAR Report, 2 columns"
SUM
CAR.SALES
CAR.HEIGHT
BY CAR.COUNTRY
BY CAR.CAR
ACROSS CAR.BODYTYPE
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END
-RUN


TABLE FILE CAR
HEADING
"CAR Report, 1 columns"
SUM
CAR.SALES
BY CAR.COUNTRY
BY CAR.CAR
ACROSS CAR.BODYTYPE
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END
-RUN

I hope you guys could guide this a bit on this subject.
Thank you so much!!!

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


WebFOCUS 8, Win/*NIX, B.I.Portal, *SQL, all outputs
April 28, 2016, 03:15 AM
glezo
*run. Excuse my horrible, awful, atrocious mistake.


WebFOCUS 8, Win/*NIX, B.I.Portal, *SQL, all outputs
April 28, 2016, 07:51 AM
MartinY
Hi glezo and welcome in WebFOCUS world.

To answer your question, you are not crazy and it's a "normal" (and documented) behavior with the ACROSS verb.

If you only have one SUM column, title won't display.

To avoid this, add a fake NOPRINT column in the SUM such as :
TABLE FILE CAR
SUM SEATS AS 'Nb Seats'
    COMPUTE BIDON/P1 = 1; NOPRINT
BY COUNTRY AS 'Country'
ACROSS CAR AS '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
April 28, 2016, 08:22 AM
glezo
Thank you SO MUCH, MartinY!
Additionally, we had another problem with styling the column title when using ACROSS in format AHTML, but it has also been solved!
Thank you so much!


WebFOCUS 8, Win/*NIX, B.I.Portal, *SQL, all outputs
April 28, 2016, 08:57 AM
glezo
Well, this have been completely [SOLVED]... Am I supposed to edit the Discussion title to add '[SOLVED]' (I tried, but couldn't figure it out how to), or will the forum admin edit it?


WebFOCUS 8, Win/*NIX, B.I.Portal, *SQL, all outputs
April 28, 2016, 09:38 AM
Francis Mariani
glezo, click the Edit icon on your first post in this thread. From here you will be able to edit the title.


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
April 28, 2016, 10:06 AM
glezo
Damned! Shame on me... thank you, Francis!


WebFOCUS 8, Win/*NIX, B.I.Portal, *SQL, all outputs
April 28, 2016, 10:31 AM
David Briars
Welcome to the WebFOCUS world Glezo.

Even as a 'newbie' to WF and FocalPoint, you did so many things to support your request and the forum in general:
* Used sample data/code to demo your issue.
* Provided feedeback/thanked those that helped you.
* Sought to add the thread disposition to the heading.

If you have discovered/are using the powerful ACROSS command already, you should be in good shape! :-)

Good luck.




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster