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     [closed] Display subhead for field that didn't meet criteria

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[closed] Display subhead for field that didn't meet criteria
 Login/Join
 
Guru
posted
I know this is a long shot but I'm gona try...

In the focexec below, would it be possible to have a subhead for ALL cars that were looked at, even though they didn't meet the criteria of COUNTRY = ENGLAND? (In our case, we actually want to know information about the CARs that didn't meet in certain cases and that's why I'd still want the subhead so that I can list that information)

  
TABLE FILE CAR
PRINT  COUNTRY SALES
BY CAR
ON CAR SUBHEAD
"HELLO"
WHERE COUNTRY EQ 'ENGLAND'
END

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


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Set flags in a define or compute to determine what and when to print.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
I actually do have that flag. The problem is that when I test on that flag, the row doesn't print and therefore the subhead doesn't print.

Or maybe I'm not understanding correctly?

Again, using the sample below (where I've included a flag in a Define), I wouldn't want to see any data rows for Audi, BMW, etc. but I would want to see Subheads for them.

 
DEFINE FILE CAR
DoPrint/A5 = IF CAR EQ 'JAGUAR' THEN 'TRUE' ELSE 'FALSE';
END

TABLE FILE CAR
PRINT  COUNTRY SALES

BY CAR
ON CAR SUBHEAD
"HELLO"
WHERE DoPrint EQ 'TRUE'
END

 


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Here's one way...

DEFINE FILE CAR
DOPRINT/A5 = IF CAR EQ 'JAGUAR' THEN '01' ELSE '02';
END

TABLE FILE CAR
PRINT  COUNTRY SALES
BY DOPRINT NOPRINT
BY CAR
ON CAR SUBHEAD
"SELECTED CARS"
WHEN DOPRINT EQ '01'

ON CAR SUBHEAD
"UNSELECTED CARS"
WHEN DOPRINT EQ '02'

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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
another:

DEFINE FILE CAR
DOPRINT/A20 = IF CAR EQ 'JAGUAR' THEN 'SELECTED CARS' ELSE 'UNSELECTED CARS';
END

TABLE FILE CAR
PRINT  COUNTRY SALES
BY DOPRINT NOPRINT
BY CAR
ON DOPRINT SUBHEAD
"<DOPRINT"
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Francis gave you a couple of good examples. You can't do the WHERE like you have in the body of the request or it will screen out the records that you actually want.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Francis,

Thanks for the samples.

Ginny,

That is exactly the problem - for the "unselected" I want to print a subhead but no data rows. Are we saying this is not achievable - that in order to get a subhead, there must be at least one row of data?


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
What would be the point of a subhead without any data rows under it?

Show us what you want in your output.


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
Guru
posted Hide Post
The reason is because there are various causes for a row that might not show up - it may have not met report criteria OR it may have not had data to begin with. Someone looking at the report wants to know the reason why something didn't show up.

For example, I have HR data that tells me employees' salaries. I want to run a report that gives me the salaries of all employees who earn more than 100K for 3 pay periods. For each employee listed, I want to have a subhead that shows me which pay period the employee didn't have data for (perhaps the employee started or ended during that time frame, the employee is new and the data is not available yet, etc.) so that when a reader don't see the employee's salary for a pay period they know that it's because there was no data for that employee vs. the employee earned less than 100K.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Virtuoso
posted Hide Post
That's a completely different situation. It sounds like you are wanting to "make up" records for areas where there are none.

If you screen out a record using selection criteria, there is no way to show a subhead. However, as Francis demonstrated, you could simply modify the display of the data (redefine to all blanks) or something like that and you would then be able to display subheads with "blank" data.

As for making up records, if that is what you're trying to do, some variation of the MacGuyver technique or simply using and DEFINES or an ACROSS with a HOLD file might do the trick.


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, 2007Report This Post
Expert
posted Hide Post
Perhaps something like this ?
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
PRINT COMPUTE
      CNTR/I9 = LAST CNTR + 1 ; NOPRINT
      COMPUTE
      FOR_CMD/A20 = IF CNTR EQ 1 THEN '''' | COUNTRY | '''' ELSE 'OVER ''' | COUNTRY | '''' ;
ON TABLE SAVE AS FEX_CMD
END
-RUN
TABLE FILE CAR
PRINT CAR
      MODEL
FOR COUNTRY
-INCLUDE FEX_CMD
WHERE COUNTRY NE 'ENGLAND'
ON TABLE HOLD AS TESTDATA
END
-RUN
DEFINE FILE TESTDATA
COUNTRY/A10 = E01 ;
END
TABLE FILE TESTDATA
PRINT CAR
      MODEL
BY COUNTRY
ON COUNTRY SUBFOOT
 "Data is Missing "
 WHEN CAR EQ ' '
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Yes, this looks like it might work. I am going to give it a shot. Thanks.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 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     [closed] Display subhead for field that didn't meet criteria

Copyright © 1996-2020 Information Builders