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     [solved] Report to HTMLFORM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] Report to HTMLFORM
 Login/Join
 
Master
posted
Hello

Below is my sample code and I am sending values typed in textbox to different fex.
  
DEFINE FILE CAR
TEXTBOX/A200 = '<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>';
END
TABLE FILE CAR
SUM
	SALES
	TEXTBOX
BY COUNTRY
ON TABLE HOLD AS RPT1 FORMAT HTMTABLE
END

-HTMLFORM BEGIN
<HTML>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
function Submit(){
     document.forms[0].submit();
 }
</SCRIPT>
<BODY style="OVERFLOW: auto">
<INPUT id=button1 tabIndex=1 value=SUBMIT onClick=Submit(); type=button name="button1">
<form id=abc target="iframe1" action="/ibi_apps/WFServlet" method="get">
<input type='hidden' name="IBIF_ex" id="IBIF_ex" value="bid/input_procedure_data">
 !IBI.FIL.RPT1;
</form></body></html>
-HTMLFORM END


Data from text boxes goes in as &VALUES1, &VALUES2 etc.

My question is..I want to send data from COUNTRY field in similar way. How can I do that?
Please suggest.

Thanks

This message has been edited. Last edited by: Enigma006,


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
If I understand your question, your wanting to send "Country" data as well as your TEXTBOX data?

If so are you wanting them to be in sync or tied together in some way?

For example:
ENGLAND:VALUE1
FRANCE:VALUE2

Also note, your hard coding the ID on your input, so your going to get an array back when you post it as they are all ID = VALUES1 and a name of VALUES.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
Like this?

DEFINE FILE CAR
TEXTBOX/A200 = '<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>';
COUNTRY/A200 = '<INPUT TYPE=HIDDEN ID="COUNTRY" NAME="COUNTRY" VALUE="' || COUNTRY || '"/>' | COUNTRY ;
END
TABLE FILE CAR
SUM
	SALES
	TEXTBOX
BY COUNTRY
ON TABLE HOLD AS RPT1 FORMAT HTMTABLE
END

-HTMLFORM BEGIN
<HTML>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
function Submit(){
     document.forms[0].submit();
 }
</SCRIPT>
<BODY style="OVERFLOW: auto">
<INPUT id=button1 tabIndex=1 value=SUBMIT onClick=Submit(); type=button name="button1">
<form id=abc target="iframe1" action="/ibi_apps/WFServlet" method="get">
<input type='hidden' name="IBIF_ex" id="IBIF_ex" value="bid/input_procedure_data">
 !IBI.FIL.RPT1;
</form></body></html>
-HTMLFORM END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
quote:
Originally posted by GavinL:
Like this?

DEFINE FILE CAR
TEXTBOX/A200 = '<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>';
COUNTRY/A200 = '<INPUT TYPE=HIDDEN ID="COUNTRY" NAME="COUNTRY" VALUE="' || COUNTRY || '"/>' | COUNTRY ;
END
TABLE FILE CAR
SUM
	SALES
	TEXTBOX
BY COUNTRY
ON TABLE HOLD AS RPT1 FORMAT HTMTABLE
END

-HTMLFORM BEGIN
<HTML>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
function Submit(){
     document.forms[0].submit();
 }
</SCRIPT>
<BODY style="OVERFLOW: auto">
<INPUT id=button1 tabIndex=1 value=SUBMIT onClick=Submit(); type=button name="button1">
<form id=abc target="iframe1" action="/ibi_apps/WFServlet" method="get">
<input type='hidden' name="IBIF_ex" id="IBIF_ex" value="bid/input_procedure_data">
 !IBI.FIL.RPT1;
</form></body></html>
-HTMLFORM END


thanks gavin..that worked. I am writing my define wrong, so the value was not passed. it works now. perfect.
Can COUNTRY field be hidden (with NOPRINT) and still can data be sent? I tried but it does not work. If field is being printed, then values are sent.

This message has been edited. Last edited by: Enigma006,


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
No, when you use NOPRINT, it hides everything from display and is used only for sorting.

This is why I named the define the same thing as the field, replacing it with the hidden INPUT along with the real data.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
If your wanting to just send country without it being displayed then you will have to do the displaying differently. I'll put together some example code for ya.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
quote:
Originally posted by GavinL:
If your wanting to just send country without it being displayed then you will have to do the displaying differently. I'll put together some example code for ya.

Thank you so much..will keep trying.


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
Try this.. Keep in mind, you will need to trim the values once submitted, as FOCUS loves to add spaces to values, since it has no concept of VARCHAR.

DEFINE FILE CAR
TEXTBOX/A200 = '<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>';
END
TABLE FILE CAR
SUM
	SALES
	TEXTBOX
BY COUNTRY
ON TABLE HOLD AS RPT1 
END

-HTMLFORM BEGIN
<HTML>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
function Submit(){
     document.forms[0].submit();
}
function TrimData(o){
	document.write(o.trim());
}
</SCRIPT>
<BODY style="OVERFLOW: auto">
<INPUT id=button1 tabIndex=1 value=SUBMIT onClick=Submit(); type=button name="button1">
<form id=abc target="iframe1" action="/ibi_apps/WFServlet" method="get">
<input type='hidden' name="IBIF_ex" id="IBIF_ex" value="bid/input_procedure_data">

<table border cellpadding=1>
<tr>
	<td align=RIGHT valign=BOTTOM>SALES</td>
	<td valign=BOTTOM>TEXTBOX</td>
</tr>
-REPEAT HENDNUM &LINES TIMES
-READFILE RPT1
<tr>
	<td align=RIGHT>!IBI.AMP.SALES;</td>
	<td>
		<INPUT TYPE=HIDDEN ID="COUNTRY" NAME="COUNTRY" VALUE="!IBI.AMP.COUNTRY;"/>
		<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>
	</td>
</tr>
-HENDNUM
-ENDLOOP
</table>

</form></body></html>
-HTMLFORM END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
actually, you don't even need that Define anymore, since I've added it to the loop.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
quote:
Originally posted by GavinL:
actually, you don't even need that Define anymore, since I've added it to the loop.


Looking for any other way to do this. This requires all formatting done in HTML like colors, font etc.


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
To pass country, it's required to be part of the results. Since your telling it to output HTML, then it's going to show up if it's a result. NOPRINT will still show the column, just not the data.

I'm can't think of another way to do it.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
Just as I say that, I had an idea and it worked.. It's still there just closed up.. Based your style if you have no borders, then it will not be visible.

DEFINE FILE CAR
TEXTBOX/A200 = '<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>';
COUNTRY/A200 = '<INPUT TYPE=HIDDEN ID="COUNTRY" NAME="COUNTRY" VALUE="' || COUNTRY || '"/>';
END
TABLE FILE CAR
SUM
	SALES
	TEXTBOX
BY COUNTRY AS ''
ON TABLE HOLD AS RPT1 FORMAT HTMTABLE
END

-HTMLFORM BEGIN
<HTML>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
function Submit(){
     document.forms[0].submit();
 }
</SCRIPT>
<BODY style="OVERFLOW: auto">
<INPUT id=button1 tabIndex=1 value=SUBMIT onClick=Submit(); type=button name="button1">
<form id=abc target="iframe1" action="/ibi_apps/WFServlet" method="get">
<input type='hidden' name="IBIF_ex" id="IBIF_ex" value="bid/input_procedure_data">
 !IBI.FIL.RPT1;
</form></body></html>
-HTMLFORM END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
I think I found a post that may help you..

http://forums.informationbuild...1057331/m/4837047916

quote:

If it's an HTML report, then you can reference an external stylesheet:
ON TABLE SET HTMLCSS OFF
ON TABLE SET CSSURL '/approot/project/stylesheet.css'


In that stylesheet you can add a CSS class definition that says:
.hidden { display: none; }

In your report style sheet you can assign that class to a column like so:
TYPE=TITLE, COLUMN=Nx, CLASS=hidden,$
TYPE=DATA, COLUMN=Nx, CLASS=hidden,$



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
Yes, the above worked for me..

I created a folder in the:
C:\ibi\apps\ folder called "gavin". I put the following code in a mytest.css:
.hidden { 
	display: none; 
}


I then used the following code, which hides the country column and still uses it to submit.

DEFINE FILE CAR
TEXTBOX/A200 = '<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>';
END
TABLE FILE CAR
SUM
	SALES
	TEXTBOX
BY COUNTRY
ON TABLE SET CSSURL '/approot/gavin/mytest.css'
ON TABLE HOLD AS RPT1 FORMAT HTML
ON TABLE SET STYLE *
COLUMN=COUNTRY, CLASS=hidden,$
END

-HTMLFORM BEGIN
<HTML>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
function Submit(){
     document.forms[0].submit();
 }
</SCRIPT>
<BODY style="OVERFLOW: auto">
<INPUT id=button1 tabIndex=1 value=SUBMIT onClick=Submit(); type=button name="button1">
<form id=abc target="iframe1" action="/ibi_apps/WFServlet" method="get">
<input type='hidden' name="IBIF_ex" id="IBIF_ex" value="bid/input_procedure_data">
 !IBI.FIL.RPT1;
</form></body></html>
-HTMLFORM END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
It's also possible to put the CSS inline:

DEFINE FILE CAR
TEXTBOX/A200 = '<INPUT TYPE=TEXT ID="VALUES1" NAME="VALUES"/>';
END
TABLE FILE CAR
SUM
	SALES
	TEXTBOX
BY COUNTRY
ON TABLE SET CSSURL '/approot/gavin/mytest.css'
ON TABLE HOLD AS RPT1 FORMAT HTML
ON TABLE SET STYLE *
COLUMN=COUNTRY, CLASS=hidden,$
END

-HTMLFORM BEGIN
<style type="text/css">
.hidden {display:none;}
</style>
<HTML>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
function Submit(){
     document.forms[0].submit();
 }
</SCRIPT>
<BODY style="OVERFLOW: auto">
<INPUT id=button1 tabIndex=1 value=SUBMIT onClick=Submit(); type=button name="button1">
<form id=abc target="iframe1" action="/ibi_apps/WFServlet" method="get">
<input type='hidden' name="IBIF_ex" id="IBIF_ex" value="bid/input_procedure_data">
 !IBI.FIL.RPT1;
</form></body></html>
-HTMLFORM END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Master
posted Hide Post
Thanks so much Gavin and Dan for your help. Hidden class trick seems to be working for my situation.


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
Glad to see it work for you, Eniqma006..

quote:
Originally posted by Dan Satchell:
It's also possible to put the CSS inline:


Dan, just for my info, how did you get it to work? When I add the inline style and remove the "ON TABLE SET CSSURL '/approot/gavin/mytest.css'", WF thinks there isn't a style, so it removes the class from the COUNTRY TD tag.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
@ GavinL: Weird. If you remove the SET CSSURL command, it doesn't work. But by pointing CSSURL to any nonsensical file (e.g., ON TABLE SET CSSURL 'testx.css'), it works fine. I tried replacing SET CSSURL with "SET HTMLCSS ON" and that didn't work.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Master
posted Hide Post
quote:
Originally posted by Dan Satchell:
@ GavinL: Weird. If you remove the SET CSSURL command, it doesn't work. But by pointing CSSURL to any nonsensical file (e.g., ON TABLE SET CSSURL 'testx.css'), it works fine. I tried replacing SET CSSURL with "SET HTMLCSS ON" and that didn't work.


Dan, its true. I pointed to non-existing CSS file, it still worked. So it surprised me but I went ahead with inline CSS.


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
Ha.. Sounds like a feature.. Smiler



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report 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     [solved] Report to HTMLFORM

Copyright © 1996-2020 Information Builders