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 have been trying to figure out for a while how to display a report prompt to a report consumer that only displays a distinct subset of the items from the prompt's (dynamic) data source.
This is a common occurence in Web-based reporting. For example- a dimension such as "Store" exists for the purpose of query and retreival and it may contain both current and old stores. In the case at hand the preferred outcome is to be able to use this dimension as the data source of a 'Select a store' prompt yet filter out all of the irrelvant stores such as those that are no longer active or do not meet some other criteria.
I assume there must be a way to accomplish this rather basic capability- can anyone please enlighten me?
Thanks!This message has been edited. Last edited by: <Michael Goshey>,
If you are a user of WF I would ask you to update your signature with the installed systems (version etc). What you want is indeed one of the basic functions that you will learn during a 2-3 days course. It is however a bit to complex to explain the whole procedure here.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Thanks Frank. I'll certainly update the signature. However, forgive me for not accepting on blind faith that this is simple (or can even be done) in WebFocus. I've taken a number of courses, studied the app pretty thoroughly, scroured the helps and documentation for days before submitting this...and I work with a couple of long-time WebFocus/Focus users. Frankly, we are stumped. We still hold out hope it can be done but you would make me (and our 1000 report consumers) very happy if you could identify a 'how to' for this....I remain skeptical.This message has been edited. Last edited by: <Michael Goshey>,
The method that gives you the most flexibility is to create a procedure that gives you the values you want. Next, you can use the GUI to create your HTML page for your main fex. Make the parameter you want to populate dynamic and tell it to use a procedure instead of a table. You can then choose the procedure you created to select the values you want. As Frank mentions, there are additional details about how the first procedure must be held to get it to work properly, and more in-depth information. It's all in the documentation. It's also a specific topic covered in training courses.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Thanks Darin- that gives me some specific direction to fish in. We've already built the reports in the HTML layout painter and all other prompts work great. Its just that there are certain prompts for which a limited subset of data will always be the norm.
Thanks for the tip- will investigate.This message has been edited. Last edited by: <Michael Goshey>,
Both of you mentioned this capability exists in the documentation but I am relatively certain it does not- at least, not in any of the materials I have (and I have the full/most recent CD of all help documentation).
I will go ahead and contact IBI directly but would still love to have someone chime in that has actually done it and can cite an example or a specific area of the documentation where it exist. Have also never seen it addressed on this or any other forum.
In kindergarten, I learned that when you ask for people's help, you should at least try their suggestions. Instead of spending your time telling people they don't know what they're talking about, maybe you should spend a little more time in the docs. I (and I can probably speak for Frank as well) have done this many times. I took five minutes and quick searched manuals and Dev Studio help and found so many examples of what you're trying to do that it would take pages to paste them all here. So instead of doing that, I'll just say (again) it's all in the documentation. Try a little harder.This message has been edited. Last edited by: Darin Lee,
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I'm convinced from your comments that we're talking about two different things but since no specifics or references were provided I can't say for sure.
Not sure what I said that caused offense but I apologize.
From your post I gather that you are using an HTML launch page created in the painter, therefore you are half the way there.
Within the JavaScripts provided by IB (ibirls.js to be precise) there is a function that loads a combo box with the result set from an XML formatted WF report or with some fields from a table.
If I take what happens during a loading for a master sourced combo box we can extrapolate the requirements for a focexec sourced operation.
On the combo box TAG line you will note the attributes for SOURCENAME, SOURCETYPE, DATAFIELD and DISPLAYFIELD. These are used within the JS to build an adhoc focexec to supply the details to be loaded.
The JS builds a request line that would go something like this - IBIF_adhocfex=TABLE FILE [sourcename]%0D%0ASUM FST.[displayfield]%0D%0ABY [datafield]%0D%0AON TABLE PCHOLD FORMAT XML%0D%0AEND
This produces an XML file that contains TD tags with "colnum" attributes of C0 and C1. These are used within a filter to populate the combo box.
To be able to use your own focexec to populate the combo box all you need to do is reproduce what the JS does (and allows for) by writing a basic focexec that returns two columns in XML format -
TABLE FILE CAR
SUM FST.CAR
BY CAR
WHERE COUNTRY EQ 'ITALY'
ON TABLE PCHOLD FORMAT XML
END
Now, all you have to do is tell the JS module that you want it to use the results from a focexec instead of a master. So, within the parameter tab, choose DYNAMIC in the control values, Procedure and then choose the fex that you want to execute to populate the combo box.
This is a simplistic view of what happens as it would take an age to go through a blow by blow of what exactly happens, but this should give you the basic understanding to assist you through your task.
Good luck
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
I assume there must be away to accomplish this basic rather basic capability- can anyone please enlighten me?
All you need to do is select 'Procedure' instead of 'Data source' for your parameter
Create a fex such as CLIST.fex containing something like
TABLE FILE STORELIST BY STORE WHERE STORE_STATUS EQ 'OPEN' ON TABLE PCHOLD FORMAT XML END
use CLIST.fex as the procedure name
If thats what you need then it is fully documented in the devstudio online help under Contents Developing Reporting Applications with Graphical tools Designing a User Interface for a Web Application with the HTML Layout Painter
One thing to add John is that if the site profile or previous processing contains SET HOLDLIST = PRINTONLY the output will only have one column in the XML and therefore the combo box will not populate as expected.
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
Tony correct yet again, and unless you know your profile settings not an obvious place to look for a trouble maker as even with ECHO=ALL in your fex you would not see it.
lets change the request to
TABLE FILE STORELIST SUM STORE BY STORE WHERE STORE_STATUS EQ 'OPEN' ON TABLE PCHOLD FORMAT XML END
I'm indebted to you all- and to Darin and Frank as well for their help. This is precisely what I was hoping for- a few specific comments that reflect a precise understanding of what we're trying to do and a concrete suggestion of how to resolve.
I had seen and played extensively with the dynamic 'Procedure' choice (in the HTML Painter) for populating a form control in contrast to using a 'Data Source', however the specifics of how to format the fex were not explained in the sparse documentation of the feature. As a result, when I tried it all it would do is fire the fex in a separate window rather than use the resultset from the fex to populate the control. I'll include the documentation reference here in case others are interested but it only tells the 'beginning' of the story.
quote:
Using Form Controls to Supply Parameter Values Select the Dynamic option in the Control Values section. To find the desired source file you want to retrieve values from, select the Data source option to retrieve values from a .mas file, or select the Procedure option to retrieve values from a .fex file. Click the browse (...) button, select a source file from the Get source file dialog box that opens, and click Open. For the Data source option only, select the data field that has the desired values from the tree structure displayed at the bottom of the Parameters tab. The data field you select will be populated in the Value field.
I am out of the office until next week but look forward to implementing your suggestions and will update the topic then with more info then.
Thank you both! I'm extremely grateful for the help.This message has been edited. Last edited by: <Michael Goshey>,
Here's the exact reference in the docs that talks about how to create the fex. Under Developing Reporting Applications with Graphical Tools> Designing a User Interface for a Web Application With the HTML Layout Painter > Using Form Controls to Supply Parameter Values > Customizing Dynamic Parameters
You have the option to allow customized retrieval of dynamic parameter values. By using a custom procedure, you can use the FOCUS language to utilize temporary HOLD files, filtering, etc. This allows the HTML Layout Painter to better integrate with a multitude of large and/or proprietary data sources that may require unique retrieval methods. The procedure must meet the following criteria:
The procedure must return a name and value pair for each parameter value that will populate the list. The first value is the submission value which is passed to the form control when the user clicks the Submit button. The second value is the display value which is what the user will see in the control. These two values can be the same or different.
The procedure must return the two data values on a single data line in XML format (PCHOLD FORMAT XML).
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007