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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Save report parameters to database

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Save report parameters to database
 Login/Join
 
Member
posted
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.
 
Posts: 19 | Registered: August 29, 2007Report This Post
Virtuoso
posted Hide Post
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, 2006Report This Post
Expert
posted Hide Post
Hi neerajk,

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. Smiler 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, 2004Report This Post
Member
posted Hide Post
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.

WF 7.1.3 ,platform Windows,
databases: Oracle,IE7
 
Posts: 19 | Registered: August 29, 2007Report This Post
Expert
posted Hide Post
Neerjak,

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, 2004Report This Post
Silver Member
posted Hide Post
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, 2007Report This Post
Expert
posted Hide Post
Yogesh,

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, 2004Report This Post
Member
posted Hide Post
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)

Pls suggest.

WF 7.1.3 ,platform Windows,
databases: Oracle,IE7
 
Posts: 19 | Registered: August 29, 2007Report This Post
Member
posted Hide Post
Thanks Tony A.
I need more inputs from you. I need t know how u read the report parameters.Is there any direct approach possible?


WF 7.1.3 ,Platform Windows,
Databases: Oracle,IE7
 
Posts: 19 | Registered: August 29, 2007Report This Post
Expert
posted Hide Post
neerajk,

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, 2004Report This Post
Member
posted Hide Post
Again, is there any way in focus to read all input parameters and values and hold in array or table.

WF 7.1.3 ,Platform Windows,
Databases: Oracle,IE7
 
Posts: 19 | Registered: August 29, 2007Report This Post
Virtuoso
posted Hide Post
The only way I would be comfortable is to use a servlet filter to iterate through the parms and insert into a table or whatever.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Master
posted Hide Post
If you need to save and reload your parameters this website might help here ia a like to there demo.

http://www.moonlightware.com/mlw_apps/html/demo1.htm




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Member
posted Hide Post
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.


WF 7.1.3 ,Platform Windows,
Databases: Oracle,IE7
 
Posts: 19 | Registered: August 29, 2007Report This Post
Expert
posted Hide Post
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, 2004Report This Post
Virtuoso
posted Hide Post
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.

Sample parm output list:
&COUNTRY=ENGLAND
&YEAR=2007
&PERIOD=4
&PCNT=3
&PN=COUNTRY^YEAR^PERIOD
&PV=ENGLAND^2007^4

Give it a try.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Dee-lish! Will give this a try! I suppose the JSP could have SQL in it to store the parms in a DB table.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Message for TexasStingray:

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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Save report parameters to database

Copyright © 1996-2020 Information Builders