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 launch page that runs a report for multiple states. I would like to display whatever states were selection from the list box at the time the report was run from the launch page. Currently, the report is set up to display the state parameter in the heading. If I were to run the report for the states of FL, AR, AL and GA, the heading would display like the following. The listbox is set up to allow multiple state selection that is coded in the fex with a multiple WHERE clause. Does anybody have a suggestion on how I can make the multiple states that appear in the report heading more presentable? Thanks.
States: 'AL' OR 'AR' OR 'FL' OR 'GA'This message has been edited. Last edited by: <Emily McAllister>,
I do this with some of my passed values to display on the report output. This replaces the OR with commas. I also pass these values back into a query to do a lookup for meaningful values, ie the actual state name if you have a lookup table.
If not you could use a decode to display the staten ame.
-SET &StateAbrevLength = &StateAbrev.LENGTH;
-SET &StateAbrevAdj = IF &StateAbrev CONTAINS ' OR ' THEN STRREP (&StateAbrev.LENGTH, &StateAbrev, 3, ' OR ', 1, ',', &StateAbrev.LENGTH, 'A&StateAbrevLength.EVAL') ELSE &StateAbrev;
Superb! Thank you MattC. Your suggestion is fantastic. It worked well. I know I can't get rid of the apostrophe marks surrounding each state because it is a reserved WF symbol, but the comma in place of the OR statements looks great! Thanks again for a terrific suggestion.
Tom, I'm getting the following error when I use your suggestion. Can you tell me what I'm doing wrong? I replaced the &StateAbrev.LENGTH with &JURIS_ST.LENGTH which is the name of the state parameter that the HTML page uses. Thanks.
-SET &StateAbrevLength = 20;
-SET &StateAbrevAdj = IF 'AR' OR 'FL' OR 'GA' CONTAINS ' OR ' THEN STRREP (20, 'AR' OR 'FL' OR 'GA', 3, ' OR ', 1, ',', 20, 'A20') ELSE 'AR' OR 'FL' OR 'GA';
-SET &StateAbrevAdj = IF 'AR' OR 'FL' OR 'GA' CONTAINS ''''THEN STRREP (20, 'AR' OR 'FL' OR 'GA', 1, '''', 0, 'x', 20, 'A0.EVAL') ELSE 'AR', 'FL', 'GA' ;
0 ERROR AT OR NEAR LINE 99 IN PROCEDURE
prod_app/pf_p0009_new_referral.fexFOCEXEC *
(FOC266) IF .. THEN .. ELSE .. SYNTAX ERROR
Tom, I need your help one more time. I still can't get your code to work. I can get the first code set to work, but can't get the second code set to work. Thanks.
First Code Set
-SET &JURIS_STLength = &JURIS_ST.LENGTH;
-SET &JURIS_STADJ = IF &JURIS_ST CONTAINS ' OR ' THEN STRREP (&JURIS_ST.LENGTH, &JURIS_ST, 3, ' OR ', 1, ',', &JURIS_ST.LENGTH, 'A&JURIS_STLength.EVAL') ELSE &JURIS_ST;
Results
Claim Jurisdiction: 'AR', 'DE', 'FL'
Second Set
-SET &JURIS_STLength = &JURIS_ST.LENGTH;
-SET &JURIS_STADJ = IF &JURIS_ST CONTAINS ' OR ' THEN STRREP (&JURIS_ST.LENGTH, &JURIS_ST, 3, ' OR ', 1, ',', &JURIS_ST.LENGTH, 'A&JURIS_STLength.EVAL') ELSE &JURIS_ST;
-SET &JURIS_STADJ = IF &JURIS_STADJ CONTAINS '''' THEN STRREP (&JURIS_STADJ.LENGTH, &JURIS_STADJ, 1, '''', 0, 'x', &JURIS_STADJ.LENGTH, 'A&JURIS_STADJ.LENGTH.EVAL') ELSE &JURIS_STADJ;
Thank you MattC, Tom and Dave for the excellent feedback. The states display just the way I want them to in the report heading. I will definitely save the code for future use.
Dave, I'm not quite sure I understand your suggestion since I'm able to display the states in the report heading by just using &JURIS_ST which is the state parameter that was already set up in the HTML page. I'm working with an HTML page that was created by someone else. He created a listbox that displays the states. It is a Dynamic Embedded procedure binded to the parameter &JURIS_ST. I'd appreciate more feedback.
Each Control in HTML Composer has a checkbox to "Send display value". For multi-select listboxes, report-heading-friendly text is sent in a variable named *_TEXT.
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
All of our parameters have the Send Display Value checked, but, we use them as filters for the report. Yes, when we converted from 7 to 8, and, IBI started prompting for these & variables that the application creates, we had to -DEFAULT all of them. Yes, they can go into a header, but, we create a Parameters tab so all of our Excel reports are compound and are utilized as real workbooks. PDF reports are where we use them in Headings, if needed...This message has been edited. Last edited by: Tom Flynn,
This is neat stuff. If I'm understanding correctly, I have two options for displaying/filtering multi-selected states.
Choice 1 1) Create a -DEFAULT parameter for the state (&JURIS_ST) 2) Add a multiple state WHERE clause in the filter section of the fex as follows WHERE tablename.tablename.JURIS_STATE EQ &JURIS_ST.(OR(FIND tablename.tablename.JURIS_STATE IN tablename)).JURIS_STATE.; 3) Add the -SET parameters that uses the STRREP function so that the states display nicely in the report heading 4) Add the state parameter in the HEADING section of the report so that the states will display
Choice 2 (eliminates the multiple WHERE clause) 1) Create a -DEFAULT parameter for the state (&JURIS_ST) 2) Create a -DEFAULTH &JURIS_ST_TEXT parameter 3) Add the -SET parameters that uses the STRREP function so that the states display nicely in the report heading 4) Add the state parameter in the HEADING section of the report so that the states will display 5) Click the Send Display Value checkbox on the Properties menu for the state listbox