March 02, 2006, 12:09 PM
newtofocusExample of a self service app.
We are in an MRE environment trying to explore using self service environment. I would really appreciate if any can either post or send me an example HTML page and focexec with parameters being passed to the focexec.
Thanks in advance.
March 02, 2006, 02:39 PM
Craig KozlowWow, what a can of worms! This can be a rather involved discussion depending on you needs, but in a nutshell
The Self-service app sends this URL:
http://server/wfvservlet?IBIF_ex=REPORT&CUSTOMERKY=48565&TIMEKY=ALL&OUTP=HTMLand WebFOCUS interprets it as..
EX REPORT CUSTOMERKY=48565, TIMEKY=ALL, OUTP=HTML
BTW, Your REPORT.FEX may want to have in it...
-DEFAULTS &CUSTOMKY = 'ABC'
-DEFAULTS &TIMEKY = 'ALL'
-DEFAULTS &OUTPUT = 'PDF'
... followed by your code.
Hint: Watch your case! It's been my experience that J2EE and/or .NET SS apps like to send lower or mixed case variables names. Fine, just realize these have to match you amper-variables. To avoid confusion, I usually translate them into something in upper case ("FOCUS-friendly" if you will), after I get them DEFAULTed. For instance, if the URL were:
http://server/wfvservlet?IBIF_ex=report&customerky=48565&timeky=ALL&outp=HTMLYou may want to:
-DEFAULTS &customky = 'ABC'
-DEFAULTS &timeky = 'ALL'
-DEFAULTS &outp = 'PDF'
-*
-SET &CUSTKEY = &customky;
-SET &TIMEKEY = &timeky;
-SET &OUTPUT = &outp;
March 03, 2006, 03:22 PM
newtofocusCraig,
Thanks for the info. However, I have the following questions:
-Do I have to always go through the webtier to execute a focexec.
- Can I use a HTML call to execute a focexec directly on a reporting server?
Thanks
March 03, 2006, 03:33 PM
susannahput an html launch page on some internet server.
if you use win2k or win2k3, then it would go under the d:\inetpub\wwwroot directory
the html launch page would contain a form to collect the parameters; the form's action would be the call to the webfocus cgi. make sure your fexes are located on your path, so that webfocus can find them. You can use isapi asi do here, or servlet, or cgi, whatever you've got.
Here's an example.
<FORM name="frm1" action="http://grwf01/cgi-bin/ibi_cgi/webapi.dll"
TARGET="_NEW"
method="get" >
<input type="hidden" name="IBIF_ex" value="FEXNAME">
<input type="hidden" name="IBIMR_domain" value="untitled/untitled.htm">
<input type="hidden" name="IBIC_user" value="edaadmin">
<input type="hidden" name="IBIC_pass" value="edauser">
//.. pass all sorts of hidden varialbe this way..parms that are fixed for this fex
<input type="hidden" name="MYPARM1" value="VALUE1">
//...all your radio and text and checkboxes etc go here
<INPUT TYPE=reset NAME="reset" VALUE="reset" ><br>
<INPUT TYPE=submit NAME="submitbutton" VALUE=" GO "
</form>
In mRE, you can use the Publish command to create a launch page for a fex...to have that launch page exist outside of mre, some simplifying changes can be made to it.