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.
What approaches have you used to allow users to save the report parameters from launch pages for future use (ie, running the same report in the future) ?
It may be worth looking at how the MRE solution operates, even if you don't end up using it directly. I played around with it some time back and wasn't too impressed -- but the topic has resurfaced here recently so I spent a bit more time on looking into it. It still leaves some to be desired, but at the same time, it's not bad. Basically it just creates it's own fex that does an include on the original HTML and then sets the values. It's actually pretty straightforward code -- but of course it's all embedded (hard-coded) into that one-off fex that is generated.
Not sure if you have access to play with MRE or not, but it may be worth a quick look -- if for nothing else but the ideas.
Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio Testing: <none> Using MRE & BID.  Connected to MS SQL Server 2005 Output Types: HTML, Excel, PDF
If you're not using MRE how are you going to approach the big questions of "Who is the user?" and "What parameter sets has this user saved?" Where would the parameters be saved? - don't know how it would be on the reporting server since it's self-service only so users can't (or shouldn't be able to) modify or create code there. Would have to be something completely outside of WF as suggested in Tom's link. Hard question since self-service, by its nature, ELIMINATES identification of the user in the WF environment, but what you're wanting to do REQUIRES identification of the user in the same.
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've done this a couple of different ways throughout the years, so here is my two cents. - if you only need to save the parameters so the user could re-run the request, then write the -SET &PARM='&VALUE'; to a fex file that the user has some control over the name. That way they can re-run at will. - if you need to repopulate the input form with the users saved values so they can make a change before they re-run, then you might want to reconsider the MRE thing, or write the parameter names and values to a database. This will allow you to retrieve them and populate the input screen.
There are a number of ways that WF can be deployed in Self service mode that will allow you to identify the consuming user, so I assume that you already have that in place. If not, then you might want to work on that before attempting this.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
We do this for all of our reports. Everything is self service. So we simply store all of the params in a database with a name specified by the user. The user can retrieve a set of params at runtime and change something or not and then run the report. This is crucial when the report has 30 params in it.
Great example of the "outside of WF" method. You could even combine this with "drill-down" functionality so a report would run first that retrieves values from the external DB matching a report name and user name, then the user could click on one link to run the report, another link to update parms. The actual report would, technically, be a drill-down passing all of the retrieved values. Another way would be to retrieve values for a specified report/user and HOLD. Then use -READ to populate them into &vars and -HTMLFORM to a page that puts the values into various controls which the user could change on-the-fly and submit the report.
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
Darin, your idea made me think of a Summit 06 presentation I saw of the accordian report. It was basically used as a navigation tool -- where each "leaf node" was a report.
(About the only good use for the accordian I've seen so far). /grumble
But, you could combine that thought with your idea and possibly have yourself a nice little navigation method for traversing reports, stored parameter sets, etc.
Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio Testing: <none> Using MRE & BID.  Connected to MS SQL Server 2005 Output Types: HTML, Excel, PDF
I have created a Javascript save/load routine which works outside of MR and saves a file locally to the users destop. This is accomplished by making our URL a trusted site (with activeX enabled) and using Microsoft ActiveX (Scripting.FileSystemObject). Of course this will only work with the I.E browser, but this is our companies requirement to our clients. Many of our reports controls (radio btn, checkboxes, edit boxes, listboxes, Textareas, etc..), need both their parameters/values and properties ( checked, hidden, enabled, disabled, etc..), saved. By creating a file locally, it enables more advanced users to set up reports and share them with other users within their organization. Some of our report templates contain many options, which can be used to generate different reports, so the necessity to save the paramaters became important.
So here is how I did it just to throw it out there.
I created two buttons (Save and Load), and
------------- Save Button Call
//Begin function button4_onclick (Save Button) function button4_onclick(ctrl) { var str = ""; var i, cnt, ED, CB;
cnt = g_PrimaryColCnt + g_AdditionalColCnt;
// Clear out the Global string InitSave();
// Add the ReportName first SaveReportName("TaxTypeDetail");
// Loop through the edit fields for(i=0; i { ED = "edit" + (i+1); SaveEditFields(ED); }
// Loop through the Checkbox fields for(i=0; i { CB = "cb" + (i+1); SaveCheckBoxFields(CB); }
// Save the List Boxes SaveListBoxItems("sys"); SaveListBoxItems("prin"); SaveListBoxItems("agent"); SaveListBoxItems("taxtype");
// Save the Hidden Additional Filters //SaveTextArea("hidden_filter");
// Write the report SaveReport("TaxTypeDetail"); }
------------ Load Button Call
//Begin function button5_onclick (Load Button) function button5_onclick(ctrl) { // Open the Choose File Dialog to get the filename button_open.click();
var fn = document.getElementById("button_open").value; if(fn == "") return false;
// Load the Report loadReport(fn); }
function loadReport(fn) { var ED, CB, i, cnt; cnt = g_PrimaryColCnt + g_AdditionalColCnt;
if(!GetReportName(fn, "TaxTypeDetail")) { alert(fn + " is not a valid parameter file for Tax Type Detail"); return false; }
function LoadListBoxValues(file, cntrl) { var fso, fp, str; var rc = false; var ForReading = 1; var Hdr = "[__" + cntrl + "__]"; var lb = document.getElementById(cntrl); var found = false; var idx = 0;
fso = new ActiveXObject("Scripting.FileSystemObject"); fp = fso.OpenTextFile(file, ForReading, false);
if( d.execCommand( 'SaveAs', null, name ) ) { window.alert( 'Report Parameters has been saved.' ); } else { window.alert( 'The file has not been saved.\n' ); }
1) Read through the DOM building a string of control Id(s) with parm setting where not the form default. You would need to identify type of control as in radio, checkbox, combobox etc. to enable determination of the value you require (e.g. selectedIndex for comboboxes). These are then passed to an activeX object such as ActiveXObject("Msxml2.XMLHTTP"). This runs a focexec that writes away the parameter string to an MS SQL table. A retrieval process together with a deletion process completed the code which is very lengthy. I also created code for a dynamic html section that controled the save, load, refresh and deletion of the saved parms.
2) Write the complete URL to a file. This can then be used within a this.location=[saved url] and will have all the parms and values required to execute the report again and again.
Out of the two, number 1 was by far the best but I would not expect an inexperienced shop to be able to support it and therefore would not suggest it in most cases. The second method is by far the easiest.
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