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.
Hey guys, I'm running into a problem with a compound excel report. I have a part of my compound report that uses NOBREAK in order to group similar fexs on a single worksheet. Each of these fexs are identical except with a different WHERE clause. The report works great, but I run into a problem when the report is blank (i.e. there are no records that match the WHERE clause) because the NOBREAK will apply to the next fex (which is meant to remain on a separate worksheet)
Here is a CAR example to illustrate the problem:
APP PATH IBISAMP
-SET EMPTYREPORT = ON;
TABLE FILE CAR PRINT CNT.CAR BY MODEL WHERE COUNTRY EQ 'ENGLAND' ON TABLE PCHOLD FORMAT XLSX OPEN NOBREAK END
TABLE FILE CAR PRINT CNT.CAR BY MODEL WHERE COUNTRY EQ 'FAKELAND' ON TABLE PCHOLD FORMAT XLSX OPEN END
TABLE FILE CAR SUM SEATS BY COUNTRY ON TABLE PCHOLD FORMAT XLSX OPEN END
TABLE FILE CAR SUM SALES BY MODEL ON TABLE PCHOLD FORMAT XLSX CLOSE END
If I had the WHERE clause in the second fex set to 'JAPAN' then the report would work as intended. But because there isn't a 'FAKELAND' value in the CAR file, the second fex doesn't populate, and the NOBREAK combines the "SEATS" fex (which is meant to be on a separate worksheet) with the initial fex. Reading through the Help file ("Creating a Compound Report") and searching through forums, I thought that adding a "SET EMPTYREPORT = ON" would address this issue, but it doesn't. Is there a method to dynamically turn off NOBREAK, if the subsequent fex doesn't have output?This message has been edited. Last edited by: <Emily McAllister>,
You could put it in a temp hold validate record size, then TABLE FILE off the hold file with a NOBREAK if data exists.
Example:
APP PATH IBISAMP
-SET EMPTYREPORT = ON;
TABLE FILE CAR
PRINT CAR
BY MODEL
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS CAR1
END
-IF &LINES LE 0 THEN GOTO SKIPCAR1;
TABLE FILE CAR1
PRINT CNT.CAR
BY MODEL
ON TABLE PCHOLD FORMAT XLSX OPEN NOBREAK
END
-SKIPCAR1
TABLE FILE CAR
PRINT CAR
BY MODEL
WHERE COUNTRY EQ 'FAKELAND'
ON TABLE HOLD AS CAR2
END
-IF &LINES LE 0 THEN GOTO SKIPCAR2;
TABLE FILE CAR2
PRINT
CNT.CAR
BY MODEL
ON TABLE PCHOLD FORMAT XLSX OPEN NOBREAK
END
-SKIPCAR2
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
Gavin, thank you for your help. I don't really use the &LINES variable so it didn't even spring to mind.
I wanted to avoid adding anymore GOTO logic (the actual report I'm implementing this into has a ton of it, and it's getting out of hand), i was just hoping for a way to turn off NOBREAK.
I might have figured a workaround though. I tried putting in a small fex right after all of the reports I want combined into one worksheet. The values are NOPRINT, so nothing actually displays but having it there switches NOBREAK "off".
APP PATH IBISAMP
-SET EMPTYREPORT = ON;
TABLE FILE CAR PRINT CNT.CAR BY MODEL WHERE COUNTRY EQ 'ENGLAND' ON TABLE PCHOLD FORMAT XLSX OPEN NOBREAK END
TABLE FILE CAR PRINT CNT.CAR BY MODEL WHERE COUNTRY EQ 'FAKELAND' ON TABLE PCHOLD FORMAT XLSX OPEN NOBREAK END -* Added this to switch NOBREAK OFF. TABLE FILE CAR PRINT CNT.CAR NOPRINT BY MODEL NOPRINT WHERE RECORDLIMIT EQ 1 ON TABLE PCHOLD FORMAT XLSX OPEN END
TABLE FILE CAR SUM SEATS BY COUNTRY ON TABLE PCHOLD FORMAT XLSX OPEN END
TABLE FILE CAR SUM SALES BY MODEL ON TABLE PCHOLD FORMAT XLSX CLOSE END
don't know if it will work, but have you trying using SET COMPOUND in between the TABLE FILE?
SET COMPOUND=CLOSE
OPEN
Is specified with the first report, and begins the concatenation process. A report that contains the OPEN attribute must be PDF or PS format.
CLOSE
Is specified with the last report, and ends the concatenation process.
NOBREAK
Is an optional phrase that suppresses page breaks. By default, each report is displayed on a separate page.
You can use NOBREAK selectively in a request to control which reports are displayed on the same page.
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server