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.
I have a compound report that prints multiple header and detail reports in a loop. Example
Header Report 1 Detail Report 1
Header Report 2
Header Report 3 Detail Report 3
Each header report should start a new page followed by the detail report on the same page. However, not every header report has a corresponding detail report (e.g. Header Report 2 above). I tried to do SET COMPOUND=OPEN and then use the NOBREAK keyword with the header report. That did not work. What the NOBREAK keyword does is to suppress the page break after the current report is done. In the case of Header Report 2, Header Report 3 prints on the same page as Header Report 2. Is there a way to specify a page break before printing a report?This message has been edited. Last edited by: Kerry,
I want to see if there is a keyword that can tell WebFocus to do a page-break BEFORE printing the report. As far as the PDF Layout Painter, I have not used it to generate compound report. Will it tell me what keyword to use and where?
Why don't you check out the documentation for it and see? I have created a compound bursted report with a report and graph but there was no situation where I didn't have the graph.
The compound reporting syntax is quite easy and, by contrast, quite well documented. It's more flexible than the older style compound reporting (and then some) and will easily cope with what you require.
Search it out and get reading, there is no better way.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
The problem is these only address simple situations. Let me restate the problem I am facing. The compound report has a header report and a details report. Each header must start on a new page. The user can choose not to print the detail report. If the detail report is selected to print, it needs to follow the header report on the same page. It is also possible that there is no detail report for a certain header report. Sounds simple enough. The compound report syntax is
SET COMPOUND= {OPEN|CLOSE} [NOBREAK]
The NOBREAK allows me to control whether to do a page break after the current report is printed. I like to be able to say "Always start the current report on a new page". How can I do this in Web Focus. Can this be done at all?
NOBREAK Is an optional phrase that suppresses page breaks. By default, each report is displayed on a separate page.
You have to read all the documentation
You need to have your code look like
SET EMPTYREPORT = ON SET COMPOUND=OPEN -loop endloop however many times TABLE FILE whatever SUM OBJECT BY VERB1 WHERE whatever ON TABLE PCHOLD FORMAT PDF NOBREAK END -SET &CLOSE = test if last iteration then 'SET COMPOUND CLOSE' ELSE ''; &CLOSE.EVAL -RUN TABLE FILE whatever Print OBJECT BY VERB1 BY VERB2 WHERE whatever ON TABLE PCHOLD FORMAT PDF END -endloop
I know what you are saying. There are ways to do it. Like I said before, the questions is how simple is the solution.
By the way, the user can choose not to print the detail report. The problem is I cannot skip the detail report because that is what is doing the CLOSE and page break. I need to put some logic to always make it an empty report.
It would be nice to be able to say
SET COMPOUND=OPEN -loop through all the headers Always print header report on a new page if detail report is selected print detail report with no page break end if end loop close output
Click on the "Search the Technical Documentation Library" link, top right.
In the left hand side of the form you are presented with, type "Document composer" (no quotes of course ) in the "Search For" input box. Choose WebFOCUS Reporting from the Select a Product and choose a release. Click on the awful yellow GO button and you will get about 46 responses. They will cover the GUI and also other useful references.
Good luck
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thank you for the info. I will look into it. Here is a question for you. Cut and paste the code below into a new fex file. It came from the document below (mostly). Did yo get a message like "Could not find a font in the Resource..." Now remove the NOBREAK from the second Report and run it again. You get a report output. Why?
The method you reference for creating compound reports, while still functioning, is not the current way to create compound documents. What Tony is saying is that the problem you are having would be a non-issue if you were to use the newer syntax. Compound documents with coordinated reports and such make this process a whole lot simpler than tyring to manage page breaks with OPEN/CLOSE/NOBREAK syntax.
Since you are on a version that supports this syntax, I would suggest that as a solution. The layout tool manages the syntax, of which Tony has given you an example.
I noticed in the 7.6.9. SNF document that the new version now properly handles paging when data elements are missing (which may be the problem.) Check it out in the documentation library.
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
Dialog manager, conditional code values: ON TABLE PCHOLD FORMAT PDF &BREAK where &BREAK may be blank or NOBREAK or CLOSE as appropriate.
When the user requests header and detail, use a preliminary TABLE ... SAVE or HOLD (before running the header report) to determine whether that iteration of the loop will produce a detail report. Then specify &BREAK= ' ' for the header report if there are details to report, &BREAK=NOBREAK otherwise.
If the user suppresses all detail report, skip the preliminary TABLE, and use &BREAK= ' ' for all iterations.
Using JG's outine,
-loop endloop however many times
-IF &DETAILS? EQ 'NO' GOTO BREAK;
TABLE FILE whatever COUNT ... WHERE ... ON TABLE SAVE END -RUN -IF &RECORDS EQ 0 GOTO BREAK ELSE GOTO NOBREAK; (one of several ways to sense need for a detail report)
-BREAK -SET &BREAK = ' '; -GOTO HEADER
-NOBREAK -SET &BREAK = 'NOBREAK'; -HEADER
TABLE FILE whatever SUM OBJECT BY VERB1 WHERE whatever ON TABLE PCHOLD FORMAT PDF &BREAK END . . . -endloop
You'll have to ensure there's a CLOSE at the appropriate point (either in the final detail; or in the last Header if it has no detail; ; or in a trailer report (wasting one page) after the loop is ended.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Thank you for your reply. I know how to do all that. I just did not like the solution. All that logic that is required. Like I said in one of my reply, I was looking for ways to do the following. I did not include details (which is not important) but you should get the idea. All that "OPEN, CLOSE, NOBREAK, last iteration, and Does the header have details" goes away. It makes the code simple and easy to read and maintain.
I am reading up on the Document Composer (thanks to Tony). From what I have read so far, it appears that is the way to go.
SET COMPOUND=OPEN -loop through all the headers one at a time Always print header report on a new page if detail report is selected print detail report with no page break end if end loop close output