Focal Point
[SOLVED] BYDISPLAY ON at Column Level

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

June 16, 2015, 10:40 AM
Ramkumar - Webfous
[SOLVED] BYDISPLAY ON at Column Level
Hello All,

Quite a long time here... Is there a way we can do the BYDISPLAY setting at column level?

Say In the below code, Country should be grouped and sorted(Same values should not repeat)... and CAR should only be sorted(Same values should repeat)

 
TABLEF FILE CAR
PRINT 
     CAR.BODY.SEATS
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
ON TABLE NOTOTAL
END
 



BYDISPLAY on globally or ON TABLE would not work for this? Any surprising direct options?

This message has been edited. Last edited by: Ramkumar - Webfous,


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
June 16, 2015, 11:06 AM
Tom Flynn
No BYDISPLAY is GLOBAL; Use NOPRINT

TABLEF FILE CAR
PRINT
CAR.COMP.CAR
CAR.BODY.SEATS
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR NOPRINT
ON TABLE NOTOTAL
END
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 16, 2015, 11:06 AM
Francis Mariani
SET BYDISPLAY is global. You could do it with COMPUTE:

TABLEF FILE CAR
PRINT 
COMPUTE COUNTRY_BY/A10 = IF COUNTRY EQ LAST COUNTRY THEN '' ELSE COUNTRY;

CAR
SEATS

BY COUNTRY NOPRINT
BY CAR NOPRINT

ON TABLE NOTOTAL
END



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
June 16, 2015, 11:08 AM
Tom Flynn
OR, Use Francis' idea!!!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 16, 2015, 11:11 AM
Francis Mariani
Or use Tom's idea! Razzer


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
June 16, 2015, 11:46 AM
Ramkumar - Webfous
Both the Ideas.. That's nice.. Smiler I just wanted to check if there is a direct way like ON TABLE SET BYDISPLAY ON 1 or 2 somethig of that sort.

Thanks,
Ram.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
June 17, 2015, 10:15 AM
Danny-SRL
Yes BYDISPLAY is global.
Couldn't have had the same possibilities as BYPANEL where one can choose?
As usual, there is always a workaround.


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

June 17, 2015, 12:42 PM
eric.woerle
just my two cents... Use Tom's idea as Francis' won't translate groupings to the database in versions before 8.1.04.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
June 17, 2015, 01:18 PM
Francis Mariani
Eric, I don't know what you mean by "translate groupings to the database". COMPUTE statements occur after the data is retrieved so they are not translated to SQL.


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
June 18, 2015, 02:19 AM
Ramkumar - Webfous
quote:
Eric, I don't know what you mean by "translate groupings to the database". COMPUTE statements occur after the data is retrieved so they are not translated to SQL.


That's right... Compute will happen after the data retrieval and aggregations(groupings). What's different here?


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
June 18, 2015, 07:54 AM
eric.woerle
Francis, run the sql trace on your statement. I've found that even with computes, when the adapter comes across a command that it doesn't know how to translate, it will default ol to a webfocus managed join and not write group by commands into the sql. For this reason I try to avoid any syntax on an initial pass that I know doesn't translate. I've seen it happen whether I put the value on a compute or not.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
June 18, 2015, 09:45 AM
Francis Mariani
I've never seen that occur with COMPUTE statements, I don't think it can happen.

TABLEF FILE RPT_RULES
SUM
COMPUTE RPT_ATTR_BY/A80 = IF RPT_ATTR EQ LAST RPT_ATTR THEN '' ELSE RPT_ATTR;

TYPE_IND
MIN.RULE_STR

BY RPT_ATTR NOPRINT
BY TYPE_IND NOPRINT

ON TABLE NOTOTAL
END


SELECT
T1.RPT_ATTR,
T1.TYPE_IND,
MAX(T1.RPT_ATTR),
MAX(T1.TYPE_IND),
MIN(T1.RULE_STR)
FROM
ENTRPT.CASH_EXP_RPT_RULES T1
GROUP BY
T1.RPT_ATTR,
T1.TYPE_IND
ORDER BY
T1.RPT_ATTR,
T1.TYPE_IND;



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
June 19, 2015, 12:44 PM
eric.woerle
I had it happen to me when using the strong concatenation. Apparently the Oracle adapter doesn't support it. Even as a compute my group by's weren't translating down.

Maybe it was an issue with the concatenation then.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2