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.
First would like to say that I have found this forum to be invaluable from my starting to use Webfocus just over three months ago. Thank you.
I now have a major issue that I need assistance with. Please can you help..
I have built up a number of fex's that I want to display as HTML using HTML layout painter. I have managed to do this.
I now want to be able to produce a drop down list over these graphs, so that when I select a value from the drop down the graphs all refresh for the chosen parameter. My difficulty lies in the fact that i want to pass one paramter value to the different graphs.
I hope this makes sense, any help would be greatly appreciated.
MIN27 - With the power of FOCUS/WF, you can find a lot of solutions to every challenge.
Try if this works for you -
#1) Have a master program that will accept the input variables and execute all the various sub-programs with a -INCLUDE.
#2) Hold the output of each sub-program to a Hold file (can be a report or graph).
#3) At the end of the master program, code a block of HTML to plug in all the hold files into the HTML page with the bang command
example -
<HTML>
..... (standard body)
!IBI.FIL.HOLD1;
!IBI.FIL.HOLD2;
!IBI.FIL.HOLD3;
.... .
..... (repeat Bang for the number of hold reports you have)
.....
</HTML>
Best regards, Sandeep Mamidenna
------------------------------------------------------------------------------------------------- Blue Cross & Blue Shield of MS WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !!
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006
I am new to coding HTML, so I am unsure as to how easy your response is. I was kind of hoping there was a simpler way, that I could get away with using the GUI.
There was just a Lab at Summit called 'Use Drill Down to JavaScript to Display Multiple Reports/Graphs' that showed how to do this using the GUI tools. The presentation is not currently on the web site. Maybe you can send an email to Larry Braun of IBI to see if he can send you the presentation, he was the one that taught the Lab. I assume his email is larry_braun@ibi.com.
Bob
Prod: WebFocus/ReportCaster 7.6.10 - Self Service - Windows 2003 Server - IIS/Tomcat
Test: WebFocus/ReportCaster 7.6.10 - Self Service - Windows 2003 Server - IIS/Tomcat
Databases: MS SQL Server, Focus DB, Output: HTML, Excel 2000 and PDF
Can you hold the parameter in an &&variable? Variables named with double-amber are held throughout the entire WF session and are avaialble to all the *.fex and TABLE FILE ... END blocks the agent-session encounters.
However, if the *.fex ends with -HTMLFORM, the session terminates and a new one starts when pressing the the form's 'Submit'. Hold the &&vars through this interval as hidden html fields in the form. They will be available to the form's Actions and be passed in that way into whatever *.fex the form launches.
Chris
WIN/2K running WF 7.6.4 Development via DevStudio 7.6.4, MRE, TextEditor. Data is Oracle, MS-SQL.
Posts: 154 | Location: NY | Registered: October 27, 2005
One of the drill-down options available in WebFOCUS is the ability to invoke a javascript procedure. The Report Painter GUI allows the developer to a select a target frame or window for the "drill to" report. By using a javascript function you can drill down to multiple reports in different frames. The resultant reports can be displayed in different frames on a single page using the HTML layout painter.
The technique can be summed up as follows:
1) Create a procedure(fex), include the reference to the javascript file via a SET command.
SET JSURL=/approot/baseapp/RunReports.js ... TABLE FILE XYZ ..
3)Modify the stylesheet of the procedure to include the javascript drill down option ... $ TYPE=DATA, COLUMN=N1, JAVASCRIPT=RunReports(param1 param2), $ ...
I'm assuming that you are creating a html page that has a number of graphs on it in individual frames. If that is so then you can add a dropdown box and assign it to a variable/parameter from the graphs using the "Parameters" tab on the properties viewer. If all your graphs use the same name for the parameter then they will all get the same value.
One easy way to do this with Dev Studio is to create the graph (or report) with a parameter and then add that graph to the HTML layout painter. Dev studio will notice the parameter is required and ask if you want to automatically add a control to the page. Make sure you use drop down list instead of text box and you should be fine.
If you want all graphs to execute when the "go" button is clicked, have a look at the HTML code there should be a requests_list="0" (your number will vary) associated with the
<FORM >
tag that Dev Studio has created. You simply need to add the other request IDs that you want to have executed to this list.
At the bottom your code you will see a section with XML code that holds info on the reports to be executed, there will be a entry fro each report/graph on the page that looks like:
I agree w/ Stu and Blue, html is very really very easy and people seem to go to great lengths to avoid using it. bite the bullet, pick up an 'html for dummies' book, spend a saturday and you'll be so glad you did. Blue's suggestion would be my first choice..its easy as pie. look..
TABLE FILE CAR
IF COUNTRY EQ &MYCOUNTRY
ON TABLE HOLD AS HOLD1 FORMAT HTMTABLE
END
GRAPH FILE CAR
IF COUNTRY EQ &MYCOUNTRY
ON TABLE HOLD AS JOLD2 FORMAT HTMTABLE
END
TABLE FILE somethingelse
IF COUNTRY EQ &MYCOUNTRY
..
ON TABLE HOLD AS MYTHING FORMAT HTMTABLE
END
-RUN
-* this is just what Blue says above
-HTMLFORM BEGIN
!IBI.FILE.HOLD1;
!IBI.FILE.HOLD2;
!IBI.FILE.HOLD3;
-HTMLFORM END
.*.now kick it up a notch and try the layout with all the tables next to each other.
-HTLMFORM BEGIN
<HTML>
<TABLE>
<tr><td>
!IBI.FIL.HOLD1;
</TD>
<td>!IBI.FIL.HOLD2;
</TD>
<TD>
!IBI.FIL.HOLD3;
</TD>
</TR><TABLE>
</HTML>
-HTMLFORM END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Whilst endorsing all that has been said above, I am not sure that any have answered your actual question. So let's see if this will help on specifics.
You say that you have managed to add your reports using the GUI but that you want to now add a control that will pass a value to each of the reports.
Ok, so the first question is how did you add your reports? If you added them by importing an existing report then you might need to start again - lets give you the whole process -
Begin a new HTML document using the painter and add four frames using - insert / frame - or clicking the frame icon (basically white with a blue top bar) and dragging out the frame size(s) that you want. You'll notice in the properties dialog that each new frame is given a unique identifier - iframe1, iframe2 etc. This allows any scripting code to identify each individual frame on the sheet and we will use these in a moment in some JavaScript.
Now add a drop down list (also known as a combobox). Again you'll see various properties in the dialog box. There is one called "name". For reference, this is the property that will be passed to WebFOCUS as an amper variable. If you reset the value to, say, Country then you would get a variable in WF that was named &Country - note that it would be case specific. In this example you won't need to change it, but it is sufficient that you know this fact.
At the bottom of the properties dialog for the drop down list, you will see a couple of tabs, select the one called parameters. This will allow you to populate tour drop down list. Check the Dynamic radio button in "Control Values" and the ensure "Data Source" is checked. Click the box to the right with the three periods within in and choose CAR.mas from the provided list of synonyms. The list is now set to use the data from CAR.mas. In the field list select COUNTRY and drag it into both the Value and Display field boxes. Notice that your list now has ENGLAND shown within it, this demonstrates that your properties are working OK. Now check the 'Add "ALL" option'.
For this example each frame will use the same fex that should be called testcar.fex and consist of -
TABLE FILE CAR
SUM RCOST DCOST
BY COUNTRY
BY CAR
BY MODEL
WHERE COUNTRY EQ '&Country'
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
ENDSTYLE
END
Now to set your control action. Click on the "Properties" tab in the properties dialog and ensure that the drop down list is the control that is selected. In this view (properties) and up from the Properties and Parameters tabs, you will see another tab called properties, and alongside it one called events. Click this tab to enter code for the OnChange an event.
Click the cell next to the onchange value and then click the box with three periods. This will take you to the HTML code itself and in particular to a new piece of inserted code between the SCRIPT tags. The new code will consist of a javascript function wrapper ready for you to enter your code and will be called when the drop down list changes. Modify the code to look like this -
You might need to add the code "IBIAPP_app=appfolder&" between the "?" and "IBIF_ex" if your app folder is not in your app path.
Save your HTML and run it and you should have a working example. If not then it will be fun to get it going.
I know that I haven't explained how and why the code works as it does, it should provide you with the necessary suuggested searches in the documentation and Google to find out more about it (them).
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 very much for the great information, i will be presenting what I have produced today, but cannot wait to get cracking with all your suggestions. susannah : the HTML book is on the way, I had decided that I needed to get one before but thanks for the advice.