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     Use html link to pass values to html form?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Use html link to pass values to html form?
 Login/Join
 
Master
posted
I have an html form created in layout painter that has 5 graphs on it, all of htem are expecting the same parameter, a salesman number.

I discovered last night that I can not drill into an html form from my report .fex, so I'm trying to find a way to do make this work outside of the stylesheet drilldown.

Currently, we are using html href's to drill into .fex's in MR using syntax like this:
http://svr99wfrs/ibi_apps/WFServlet?
REP_GRP_CHRONO=BYMONTH&
REP_GRP_LOCALE=IGGY&
REP_GRP_ATTRIB=IGGY&
RETURN_EFFECT=C&
BEGIN_MONTH=200608&
END_MONTH=200708&
FACILITY_CODE=FOC_NONE&
STORE_CODE=FOC_NONE&
CUST_CLASS_CODE=FOC_NONE&
CUST_NUMBER=FOC_NONE&
PL_NUMBER=FOC_NONE&
SALES_ACCT_CODE=FOC_NONE&
GROUP_NUMBER=FOC_NONE&
SUB_GROUP_NUMBER=FOC_NONE&
ITEM_NUMBER=FOC_NONE&
YEAR_COUNT=4&
MTD_PRORATE=True&
USE_VIEWER=False&
REP_SHOW_BUDGET=False&
IBIMR_domain=matrixxg%2Fmatrixxg.htm&
IBIMR_action=MR_RUN_FEX&
IBIMR_sub_action=MR_STD_REPORT&
IBIMR_fex=app%2Fwcqrgj18.fex&
IBIF_ex=app%2Fwcqrgj18.fex&
IBIMR_flags=&
IBIMR_folder=%23newdivisiona&
IBIMR_user=jason&
IBIMR_pass=sesame&
IBIMR_random=0.07300190680992202&
Submit=Submit
">test2342



Honestly, I got this information from 'publishing' the .fex and taking the information from the querystring in the URL bar. There's no values shown in the URL for the html form, so I'm at a loss for what to put in my html href tag.

Any ideas?


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Expert
posted Hide Post
I know this sounds crazy, but I don't understand what you want to do.

Would you please explain what you originally wanted to do before giving up and trying something new?

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
Master
posted Hide Post
Francis,
I'm trying to take a report built with report painter and drill into an html form that has 5 graphs fueled by one amper variable.

Maybe I should give an example rather than pretending to be technical. Wink

My report .fex shows say 10 salesman, one row for each, so salesman is my by field. Now, i want to create a drill down from the data in that report that passes the salesman field to an amper variable in an HTML form (created in html layout painter) that has 5 graphs, each of which has a WHERE SALESMAN_NAME EQ '&SALESMAN'.

The only way that I know of to put 5 graphs 'together' is with the HTML or PDF layout painter, and by 'together' I mean so the user can see all kinds of great information for a salesman that they would like to analyze.

This was the original thought, drill from the All salespeople report into the single salesperson but all information for that salesperson html form. We ran into a snag with drilling into an HTML form from the .fex.

You're right Francis, I think this is a really simple problem that I made very techinical in my first post.

Thanks for your patience.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Gold member
posted Hide Post
Jason,

I did this by creating a focexec that drills to another focexec which calls the html form.

My report shows a list of countries with a drill down to showsetvar.fex. Showsetvar.fex only contains -HTMLFORM showVarible. The html form then picks up the amper variable by using !IBI.AMP.COUNTRY;

setvariable.fex
-* File setvariable.fex
TABLE FILE CAR
BY COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=DATA,
     COLUMN=N1,
     TARGET='_blank',
     FOCEXEC=showsetvar(COUNTRY=N1),
$
TYPE=TITLE,
     STYLE=BOLD,
$
ENDSTYLE
END


showsetvar.fex
-* File showsetvar.fex
-HTMLFORM showVariable.htm


showVariable.htm
<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
var rltVersion = "76";
var cgipath = "cgipath";
var ibirls = "ibirls2";

var rltdyncalendar = "rltdyncalendar";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls src="/ibi_html/javaassist/nls.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);</SCRIPT>

<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="false">
<SPAN id=text1 style="Z-INDEX: 1; LEFT: 50px; WIDTH: 290px; POSITION: absolute; TOP: 20px; HEIGHT: 38px" tabIndex=1>You selected !IBI.AMP.COUNTRY;</SPAN>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value="baseapp baseapp" name=ibiapp_app></BODY></HTML>




Windows: WF 7.6.2: SQL Server 2008 R2
 
Posts: 86 | Location: Chicago | Registered: August 03, 2007Report This Post
Master
posted Hide Post
This is Great!

I've run into a little snag though. How do I gather the value from the !IBI.AMP. variable?

here's a snippet from my html form,
< ![CDATA[-*focexectool
TABLE FILE ACPBANKL
PRINT
MY_TESTDATA
HEADING
""
FOOTING
""
WHERE TOTO EQ !IBI.AMP.PL_NUMBER;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *


I'm getting an error of
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: !IBI.AMP.PL_NUMBER

This is all a very new concept to me.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Expert
posted Hide Post
I think that should just be &PL_NUMBER.

!IBI.AMP is used only HTML that's coded within -HTMLFORM statements.


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
Master
posted Hide Post
actually, I figured that out.... very simple mistake, I wasn't passing the value to the .fex on drilldown. silly error.

thanks for your patience.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Master
posted Hide Post
does anyone know why my html form would show the frame, but no report when I do a
WHERE PL_NUMBER EQ '!IBI.AMP.PL_NUMBER';

but it runs just fine when I hard code it like this..
WHERE PL_NUMBER EQ '16';

it seems like it's just ignoring the entire report because of the !IBI.AMP var, rather than trying to run it and giving an error.

Thanks!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Expert
posted Hide Post
Jason,

As per Francis, your problem lies in the fact that you are not using correct syntax in your WHERE -

quote:
WHERE PL_NUMBER EQ '!IBI.AMP.PL_NUMBER';


If your field format is alphanumeric then this should be -
WHERE PL_NUMBER EQ '&PL_NUMBER'


The !IBI.AMP syntax is for use within HTMLFORM.

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
Expert
posted Hide Post
For a simple example on how you would use the two different types, try this piece of code. It uses one amper variable called Country -
TABLE FILE CAR
BY COUNTRY
IF RECORDLIMIT EQ 1
ON TABLE SAVE
END
-RUN
-READ SAVE, &Country
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>!IBI.AMP.Country;</title>
</head>
<body>
<textarea>!IBI.AMP.Country;</textarea>
</body>
</html>
-HTMLFORM END

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
Expert
posted Hide Post
To perhaps better answer why it appears the program is "ignoring the entire report":

If you have a syntax error in the TABLE file and it is not trapped via program code, the program will continue to the HTMLFORM and if you're embedding the result of the TABLE FILE with a !IBI.FIL.XXXX; and it doesn't exist, the HTMLFORM will still be displayed.

You would have to "View Source" to see the error.

I always check for errors after an END statement with something like this:
END
-RUN
-IF &FOCERRNUM NE 0 GOTO FOCERR;


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
Master
posted Hide Post
Tony, does that simple -READ SAVE, &var save the variable's value to !IBI.AMP.var? That is really handy!

I think it's all but working now. One thing I had to do, however, was convert my master file from alpha to numeric, and implicitly typecast the value to a number. Odd how that works. here's a little example.

when using this in a fex imported into my html form...
WHERE PL_NUMBER EQ '!IBI.AMP.PL_NUMBER';
(the pl_number field was originally alphanumeric) we would get some funny errors like " ' missing " or 'IBI.AMP.PL_NUMBER'; not found...or similar.

So, I tried an EDIT()...no go. syntax problems with that. Then, I just went ahead and dumped the tick marks and made it.
WHERE PL_NUMBER EQ !IBI.AMP.PL_NUMBER;

gave us a "alpha can't be compared to numeric" which is odd as the fex that calls it has a pl_number of alpha to, so webfocus is typecasting that alpha into a number on it's own. Frustrated and thinking I want to get this project done, i just went ahead and changed the master file's for reports in my html form to numeric fields rather than alpha. now, it works fine....but is still very puzzling.

If anyone has any light to shed on this typecasting thing, I'd love to hear it. We've had to do more workarounds with typecasting to make things work than I'd like to mention.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Expert
posted Hide Post
WHERE TABLE_COLUMN EQ '&BLAHBLAH' is used for alpha table columns.

WHERE TABLE_COLUMN EQ &BLAHBLAH is used for numeric table columns.

No "typecasting" going on here.

By the way, the correct syntax for embedding an amper variable in an HTMLFORM is:

!IBI.AMP.VARIABLE_NAME;

The semi-colon is important.

In your code, you specify that this WHERE statement is not working correctly:

WHERE PL_NUMBER EQ '!IBI.AMP.PL_NUMBER';

It should be coded like this:

WHERE PL_NUMBER EQ '!IBI.AMP.PL_NUMBER;';


Subtle, innit?


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
Master
posted Hide Post
Francis, you are the man.
thanks!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Expert
posted Hide Post
Jason,

To answer your above question, &Var and !IBI.AMP.Var; are one and the same. Just different ways of accessing the same variable.

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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Use html link to pass values to html form?

Copyright © 1996-2020 Information Builders