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.
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,
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
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
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
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.
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?
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.
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, 2007
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