Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Passing parameters
 Login/Join
 
Silver Member
posted
Hi guys,
New to Dev studio.

Using WF 7.1.1 Client, WF 7.1.1 Server. Dev studio 7.1 Version.

I dont know how to pass parameters from Front end screen designed in HTML Layout(Dynamic drop down box, Text box, Radio buttons) & passing these parameters back to FEX file for grabbing user's choice & generating the Report in seperate window.

Tried looking in Doc & Help file, but couldn't find.
Please help me guys

Thanks
 
Posts: 36 | Location: Boston MA | Registered: October 12, 2006Report This Post
Gold member
posted Hide Post
If you are using MRE I have an example for you ...

Creating a WebFOCUS Launch Page



Loyola University Chicago
Date: 20041116
Operating System: NA
Product: WebFOCUS
Task: Creating a launch page with dynamic drop down menus
Access: User must be a WebFOCUS Developer or Administrator to do this
User Level: Any Developer or Admin.


These steps assume a knowledge of HTML and using WebFOCUS to generate HTML. If you are not well versed in either of these topics it may be helpful to follow the link above or use your favorite search engine to find "tutorial html".

Overview
When you create a parameterized report, WebFOCUS will automatically generate a launchpage for you that has little to no style and the default input method is a textbox. While this is good for testing or someone who knows exactly what the parameter values will be and what they mean, a standard user or an University administrator may have little knowledge of the day to day workings of the system. For these users we will want to create launch pages which will act as our user-friendly front-end.

Creating a static Select Box
  
          -HTMLFORM BEGIN
          <HTML>
             <BODY>
               <SELECT NAME="PARAM_NAME">
                  <OPTION VALUE="1">One</OPTION>
                  <OPTION VALUE="2">Two</OPTION>
                  <OPTION VALUE="3">Three</OPTION>
               </SELECT>
             </BODY>
          </HTML>
          -HTMLFORM END
 

Generates the following select box:


Here we will point out several important details.

First, this makes input for the standard user much easier.
Second, notice the value for the selection is different than what is displayed. This is useful when passing codes to your program while outputting descriptions for the end users.
Third, While this is helpful, what happens if we need to add a forth value?
The answer is that you would have to manually edit the web page. While this isn't a very large undertaking for this one project, it would prove extremly time consuming if changes were made often or there were a large number of additions.

Dynamic Dropdowns
The solution to the above problem is creating dynamic select boxes or dropdown lists. To do this there are three important steps:

Create option values and place them in a hold file.
Create a web page and populate the dropdowns with the !ibi.fil command.
Make appropriate changes to the FORM inputs to run the desired report.
To create the option values you create a COMPUTE concatinating the appropriate OPTION syntax described above.
        TABLE FILE LUR_TERM_TBL
        PRINT
        COMPUTE TERMS/A99 = '<OPTION VALUE="' | STRM | '">' | DESCR | '</OPTION>';
        BY HIGHEST STRM NOPRINT
        ON TABLE HOLD AS HTERMS FORMAT ALPHA
        END
  

This will go through the available terms table and create option values for each term with the number value (such as 1046 for fall 2004) and the description will output for the user to choose (in this case it will say 'FALL 2004'). Note the use of FORMAT ALPHA as the output. This is the only hold format that will work with this technique.

To create the web page and populate the dropdowns with teh !ibi.fil command you do the following:
        TABLE FILE LUR_TERM_TBL
        PRINT
        COMPUTE TERMS/A99 = '<OPTION VALUE="' | STRM | '">' | DESCR | '</OPTION>';
        BY HIGHEST STRM NOPRINT
        ON TABLE HOLD AS HTERMS FORMAT ALPHA
        END

        -* New Code Below *-

        -HTMLFORM BEGIN
          <HTML>
            <BODY >
              Please Enter the term: 
              <SELECT NAME="TERM">
                !IBI.FIL.HTERMS;
              </SELECT>
            </BODY>
          </HTML>
        -HTMLFORM END
      

The key here is the !IBI.FIL.HTERMS line. This must be on a line by itself and the last piece of it is the name of the hold file we created above. Keep in mind that hold files cannot be named with more than 8 characters and cannot contain special characters. When this .fex file is run it will generate the following output:

1056Fall 2005 Fall 2005 1054Summer 2005 Summer 2005 1052Spring 2005 Spring 2005 1048Winter 2004 Winter 2004 1046Fall 2004 Fall 2004 1044Summer 2004 Summer 2004
For the sake of brevity I only included the first few lines of the code.

This is all well and good. Our select statment is created. We have a useful code as the value and a descriptive option for the user to select. The only thing missing is to have this information sent to the corresponding report.

To send this information to the report we must place it into a form as well as add instructions on how it should be run.
        TABLE FILE LUR_TERM_TBL
        PRINT
        COMPUTE TERMS/A99 = '<OPTION VALUE="' | STRM | '">' | DESCR | '</OPTION>';
        BY HIGHEST STRM NOPRINT
        WHERE ACAD_CAREER EQ 'UGRD'
        ON TABLE HOLD AS HTERMS FORMAT ALPHA
        END
        -* New Code Below *-

        -HTMLFORM BEGIN
          <HTML>
            <BODY >
              <FORM action='/ibi_apps/WFServlet' method='post'>
                <INPUT NAME="IBIF_ex" VALUE="REPORT_NAME" TYPE="hidden">
                Please Enter the term:
                <SELECT NAME="TERM">
                  !IBI.FIL.HTERMS;
                </SELECT>
                <input type='hidden' name='IBIMR_domain' value="DOMAIN/DOMAIN.htm">
                <input type='hidden' name='IBIMR_action' value="MR_RUN_FEX">
                <input type='hidden' name='IBIMR_sub_action' value="MR_STD_REPORT">
                <input type='hidden' name='IBIMR_fex' value="app/REPORT_NAME.fex">
                <input type='hidden' name='IBIF_ex' value="app/REPORT_NAME.fex">
                <input type='hidden' name='IBIMR_flags' value="">
                <input type='hidden' name='IBIMR_folder' value="#FOLDER_NAME">
                <input type='hidden' name='IBIMR_random' value=''>
                <INPUT NAME="submit" TYPE=SUBMIT VALUE="Run Report">
                <INPUT NAME="reset" TYPE=RESET VALUE="Clear Form">
            </BODY>
          </HTML>
        -HTMLFORM END
      

Some explanation is needed here for a few terms since the above code will not work on it's own.

REPORT_NAME - This is the name of your report... if your report is named myreport.fex then you need to put in 'myreport' (please take note of when the .fex is needed and when it is not).
DOMAIN/DOMAIN.htm - when you right click on the domain the name will appear this way. When you right-click on the domain and look at properties this value is listed next to "href"
FOLDER_NAME - similar to the domain in that this is the value you find from the properties of the folder.
The report
Now that we have the form setup and the dropdowns populated we can send this data to a report that is expecting the term. To do this you can do something like this:
       TABLE FILE REC_STDNT_CAR_TERM_DIM
       PRINT *
       WHERE CTERM_TERM_CD EQ '&TERM';
       WHERE READLIMIT EQ '1000';
       END
   


If the above report is located in the designated domain/folder/fexname location then it will recieve the parameters

This message has been edited. Last edited by: George Brown,


George D. Brown
Loyola University Chicago
gbrown2@luc.edu
 
Posts: 77 | Location: Chicago, IL | Registered: May 06, 2004Report This Post
Silver Member
posted Hide Post
Thanks for information, Iam comfortable with MRE envir.

Dont know how do we do in DEV Studio.

Just wandering how can we pass HTML element Values desinged in HTML Layout to FEX files,
(using Report Painter & HTML Layout).

Report Painter is used for designed the Report (FEX) file. HTML Layout is used for designing Launch pages with choices (HTML Elements - Textbox,list box values......)

Looking for ways to pass the parameters between HTML - FEX Programs.

Thanks
 
Posts: 36 | Location: Boston MA | Registered: October 12, 2006Report This Post
<sandy_16>
posted
-* File parameteric_Report.fex
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
BODYTYPE
SEATS
DEALER_COST
RETAIL_COST
SALES
WHERE COUNTRY EQ '&COUNTRY.().country.';
WHERE MODEL EQ '&MODEL.().Model.';
WHERE CAR EQ '&CAR.().car.';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
ENDSTYLE
END

Copy this code to the text editor and save the report and follow the below steps.
1.open a new html file
2.Go to Insert tab and clik on import existing procedure and then import ur procedure.
3.Manage layout screen appears say Ok.
4.New parameters screen appear you can change ur controls there from text box to drop down or anything which is there and say OK.
5.go to the parameters tab and play around to populate ur drop down lists and then run ur report.
 
Report This Post
Expert
posted Hide Post
Novice (we were all there onceWink),

An HTML form element has an attribute called "name". What ever this is set to will be interpretted by WebFOCUS as the variable name.

e.g. If you have the element -
<input name=myvar value="anything you want">
, when the form is executed and your fex is called, a variable called myvar with the value anything you want will be available to you.

This is true of both Apps and MRE environments.

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, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders