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 am working on a compound PDF report which has a very specific layout and styling defined in the fex. Most of the content for the report is default texts and all those texts have been defined in the fex.
DEFINE FILE SHORT ...... ..... TEXT001/A50 WITH CONTINENT = 'Northern Leasing (NLS)'; TEXT002/A50 WITH CONTINENT = 'Northern Leasing Systems, Inc.'; TEXT003/A50 WITH CONTINENT = '419 East Main Street'; TEXT004/A50 WITH CONTINENT = 'Suite 102'; TEXT005/A50 WITH CONTINENT = 'Middletown, NY 10940'; .... .... END
TABLE FILE SHORT PRINT TEXT001 IN 2 AS '' TEXT002 IN 17 AS '' OVER TEXT003 IN 17 AS '' OVER TEXT004 IN 17 AS '' OVER ....... ....... WHERE RECORDLIMIT EQ 1 ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT PDF OPEN ON TABLE SET STYLESHEET * TYPE=REPORT, FONT=VERBANA, SIZE=10, STYLE=BOLD, COLUMN=TEXT001, JUSTIFY=CENTER, WRAP=1.20,$ TYPE=REPORT, FONT=VERBANA, SIZE=9, STYLE=BOLD, COLUMN=TEXT002, WRAP=6,$ .......... ........ TYPE=REPORT, NAME='BOXALL', OBJECT=BOX, POSITION=(0.2 0.2), DIMENSION=(8.10 10.5), BORDER-COLOR=BLACK, BORDER=MEDIUM,$ TYPE=REPORT, NAME='BOX001', OBJECT=BOX, POSITION=(0.200 0.700), DIMENSION=(8.10 0), BORDER-COLOR=BLACK, BORDER=MEDIUM, BACKCOLOR=WHITE,$ TYPE=REPORT, NAME='BOX002', OBJECT=BOX, POSITION=(0.200 0.700), DIMENSION=(1.45 1.55), BORDER-COLOR=BLACK, BORDER=MEDIUM, BACKCOLOR=WHITE,$ TYPE=REPORT, NAME='BOX003', OBJECT=BOX, POSITION=(0.200 2.250), DIMENSION=(8.10 0), BORDER-COLOR=BLACK, BORDER=MEDIUM, BACKCOLOR=WHITE,$ .......... ............ ENDSTYLE END
I am pasting part of this code so as to give everyone an idea of what I am trying to do... I have about 100 texts defined and being printed on my report... Out of all these texts, I have few that are conditional based on what the user selects on the HTML launch page for this report... If the user selects a particular option 'CTP' (for example) then I have to print above lines, if not then some other lines of text..
How do I go about conditionally printing certain lines so as to not disturb my formatting or spacing or text placements?
I tried numbering these texts as ROW1, ROW2, etc by defining an integer variable called ROW and then tried this:
TABLE FILE SHORT PRINT ....... ........ .......... FOR ROW NOPRINT 1 OVER 2 OVER 3 WHERE &PARAM EQ 'CTP' ........ ....... END
But this gave me an error FOC138 which I don't understand why..
Any thoughts on how I can conditionally make certain rows of text visible/printable based on user input?
Thanks in advance!This message has been edited. Last edited by: Nova27,
Without knowing the full complexities of your needs it is a bit difficult to give you the "Best" solution, but some options you might want to consider is using GOTO syntax.
.....
PRINT
-IF &OPTION1 EQ 'CTP' THEN GOTO :CTP
-IF &OPTION1 EQ 'TPS' THEN GOTO :TPS
-:CTP
TEXT001
TEXT002
-GOTO :COMPLETE
-:TPS
TEXT003
TEXT004
-GOTO :COMPLETE
-:COMPLETE
ON TABLE HOLD AS...
You could also define variables with comments like
-SET &SHOWFIELD= IF &OPTION1 IN ('CPT','TPS') THEN '-*' ELSE '';
TABLE FILE...
PRINT
&SHOWFIELD.EVAL TEXT001
&SHOWFIELD.EVAL TEXT002
&SHOWFIELD.EVAL TEXT003
ON TABLE HOLD ....
You could also store you text in a table as well and read from the table which would allow you to pass your options as regular parameters. Considering that you aren't reading your values from a table already, I'm going to assume that it was already decided to not do this in the first place.
Personally I would probably go the table route... but thats me.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Use Dialogue Manager GOTO commands, something like:
TABLE FILE ...
PRINT
-GOTO &PARAM
-CTP
TEXT001 IN 2 AS ''
TEXT002 IN 17 AS '' OVER
TEXT003 IN 17 AS '' OVER
TEXT004 IN 17 AS '' OVER
...
-GOTO ROWS_END
-ABC
TEXT011 IN 2 AS ''
TEXT012 IN 17 AS '' OVER
...
-GOTO ROWS_END
-DEF
TEXT021 IN 2 AS ''
TEXT022 IN 17 AS ''
-GOTO ROWS_END
-ROWS_END
...
END
Note this GOTO will only work if there are no blanks or some other special characters in the possible values of &PARAM.
If there are, you will have to do it a little differently:
TABLE FILE ...
PRINT
- IF &PARAM EQ 'CTP' THEN GOTO CTP
- ELSE IF &PARAM EQ 'A B C' THEN GOTO ABC
- ELSE IF &PARAM EQ 'D%F' THEN GOTO DF
- ELSE GOTO THE_REST;
-CTP
TEXT001 IN 2 AS ''
TEXT002 IN 17 AS '' OVER
TEXT003 IN 17 AS '' OVER
TEXT004 IN 17 AS '' OVER
...
-GOTO ROWS_END
-ABC
TEXT011 IN 2 AS ''
TEXT012 IN 17 AS '' OVER
...
-GOTO ROWS_END
-DF
TEXT021 IN 2 AS ''
TEXT022 IN 17 AS ''
-GOTO ROWS_END
-THE_REST
TEXT091 IN 2 AS ''
TEXT092 IN 17 AS ''
-GOTO ROWS_END
-ROWS_END
...
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