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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
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
..... (standard body)
..... (repeat Bang for the number of hold reports you have)
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
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.
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
The technique can be summed up as follows:
SET JSURL=/approot/baseapp/RunReports.js ... TABLE FILE XYZ ..
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
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
GRAPH FILE CAR
IF COUNTRY EQ &MYCOUNTRY
ON TABLE HOLD AS JOLD2 FORMAT HTMTABLE
TABLE FILE somethingelse
IF COUNTRY EQ &MYCOUNTRY
ON TABLE HOLD AS MYTHING FORMAT HTMTABLE
-* this is just what Blue says above
.*.now kick it up a notch and try the layout with all the tables next to each other.
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 -
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
WHERE COUNTRY EQ '&Country'
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
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.
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.