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 50 - 100 parameters (could be more) for my HTML report output. As per my requirement ,I need to save all my parameters to oracle table.Can anyone suggest.
I first would like that you upgrade your signature with the version you use, the platform and other info so we can better help you.
What do you want.... Let the user enter 50-100 parameters to run the report? Or are these "parameters" fields in the report you want to build? Or is this an application to enter data into a database?
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
Here is suggestion from internal experts: The WebFOCUS Client Amper Auto Prompting feature inserts a Save Parameters button on the form for users that have the Save entered values privilege. Developers can also add the Save Parameters button to a form from the HTML Layout Painter. For complete details, see the WebFOCUS Managed Reporting Developer's Manual (DN4500689.0905) or the WebFOCUS/iWay New Features 7.1 (DN9400232.0905).
Hope this helps. Many thanks to Frank's input too.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
Hi FrankDutch, The HTML format report is built using around 100 parameters from Launch page.now when the report is built i want to save parameters to table so that i can rebuilt report with saved parameters later when required by forming URL.
I did this a couple of years ago for a previous Client.
Basically I read the DOM and wrote out the name, id, value and any other attribute for each control that I encountered during the read operation. From these values I built a parameter string that I then passed to a standard .fex that I created to read the string and cut it into the various values required. I then used MODIFY to add the data to an MS SQL table.
I also had another function that read the SQL table and then reset the HTML page with the data.
It worked amazingly well but it was a lot of work! I cannot give you the code for contractual reasons of copyright, but if you take the above thoughts then you should be able to recreate it.
Failing that then I would be happy to negotiate consultation to assist or write from scratch a similar process that would provide you with what you require.
Note: The IB version saves the parameters to a custom report in the Users folder and then INCLUDEs the called fex?
It all depends upon how you want to apply your requirement.
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
Another idea ! Since you need to save all your parms to an Oracle table one easy way would be to use direct SQL to insert data into table.
Step 1: Identify all the paramters/fields that you would need to save/insert in oracle table. I am assuming you have 100 parms to save to a table. Step 2: Create table Myparms ( field1 format, field2 format, .. field100 format ) - You need to have this table created in your oracle database so that everytime you need to save parms the table already exist in DB , so all you need to do is an insert. Step 3: When ever you need to save parms to table use insert sql sql sqlora insert into tablename (field1, field2,... field100) (value1 , value2, ... value100); - value1 thru value100 could be an amper variable and you can add the above insert sql inside your webfocus report code.
- Please note create table and respective insert above is a general idea, based on your requirement you may have custom situations so you have to design/create your table and develop insert sql accordingly.
Hope this helps !!
-Yogesh Patel ------------------------------------------------------------------------ PROD: WF 764 on Linux Apache tomcat v5.5 DEV: WF 768 on Linux
Posts: 42 | Location: Edison, New Jersey | Registered: January 30, 2007
That is basically what my JS module did, although it was flexible enough to be plugged into any HMTL page and work without change. So it didn't matter whether you had 1 or 500 different form controls, it wrote them all and recalled them when required.
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 am familiar with insertion thru SQL.Is there any way to READ all parameters in report.I do not want to remember 100 parameter names and then insert them. Table that i have is (ReportID NUMBER, ReportName VARCHAR2, ParameterName VARCHAR2, ParameterValue VARCHAR2, CreatedDate DATE, CreatedBy DATE)
As I mentioned above, read through the DOM (document object model) using JavaScript and build the parameters you need. You will then need to make a call to a server process to write out the values. I used the getXml function within the ibirls2.js module.
It is a very involved process and not one that I would suggest you undertake if you do not even know what the DOM is or how to read it using JS.
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
Its easy to parse when GET method is used on form submit.We can take "document.location.href" and thus read Querystring. But I am using post method.My aim is to capture all parameters on the report and save them and reload them when needed.
Seeing another post by Francis reminded me that you could add
<set> QUERY_STRING(pass)
to your site.wfs and then you would be able to access all the variables passed from your HTML form into the called fex. This might give you some ability to achieve what you need.
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
So, here is something you can do. Copy the following code into a file with a .jsp extension. Place the file into the webfocus web application ... for exemple: C:\ibi\WebFOCUS76\webapps\webfocus76\exportparms.jsp.
<jsp:directive.page language="java" import="java.util.*" />
<jsp:scriptlet>
String pnames = null;
String pvalues = null;
int i = 0;
// build list of reserved parms not to be included in the process.
Vector reserved = new Vector();
reserved.add("IBIMR_Random");
reserved.add("IBIF_ex");
reserved.add("CLICKED_ON");
for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) {
String parmName = (String) e.nextElement();
String parmValue = (String) request.getParameter(parmName);
if (!reserved.contains(parmName)) {
i++;
if (pnames == null) {
pnames = parmName;
pvalues = parmValue;
} else {
pnames += "^" + parmName;
pvalues += "^" + parmValue;
}
}
}
</jsp:scriptlet>
<jsp:forward page="/WFServlet" >
<jsp:param name="PCNT" value="<%= i %>" />
<jsp:param name="PN" value="<%= pnames %>" />
<jsp:param name="PV" value="<%= pvalues %>" />
</jsp:forward>
Now, change the report submit form's action from "/ibi_apps/WFServlet" to the jsp: "/ibi_apps/exportparms.jsp"
This jsp will collect all of the parm names and display them via a single ampher variable called &PN that will use a "^" as a deliniation for the names. The values will be bundled the same way under an ampher variable called &PV. There is one more variable called &PCNT that will tell you the number of parms that were collected. You can then use the number to control a repeat loop to split the PNs and PVs using a GETTOK function. That should give you what you want.
Absolutely. I just did it this way to keep the values in webfocus. It saves the burden of including all the necessary jdbc jar's etc. in the web app as well.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
While the Moonlight Ware Save/Load parameter demo is interesting, it a product that costs $1200, so it's not too helpful a link - I thought we were helping each other out with problem solving and coding examples, not product sales.
Cheers.
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