Focal Point
[CLOSED] Dynamic HTMLFORM statement

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/843100534

May 05, 2010, 07:35 AM
WebGuy0212
[CLOSED] Dynamic HTMLFORM statement
How do you create dynamic HTMLFORM statements? I've found an example on the forum similar to the following code but I keep getting an error that says "(FOC36223) FILENAME @0000003HTML SPECIFIED BY -HTMLFORM COULD NOT BE FOUND".

-SET &LAUNCH_FILE = 'approot/lp_app_summary.htm';
-SET &LAUNCH_FORM = '-HTMLFORM ' | &LAUNCH_FILE;
&LAUNCH_FORM.EVAL

This message has been edited. Last edited by: Kerry,
May 05, 2010, 10:09 AM
Francis Mariani
You may need to do include the HTMLFORM statements:

-SET &LAUNCH_FILE = 'c200/fmtest10.html';
-HTMLFORM BEGIN
-INCLUDE &LAUNCH_FILE
-HTMLFORM END



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
May 05, 2010, 10:46 AM
njsden
Can an -INCLUDE be added within -HTMLFORM BEGIN/END?

I had the idea that only HTML code could exist there and therefore the need for using !IBI.AMP.xx to refer to DM &variables. I'll give it a try at using -INCLUDE because if it works that'll open some interesting possibilities.

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
May 05, 2010, 10:58 AM
Francis Mariani
Nefatli, you caught me!

Though it works, I wouldn't use an amper in an HTMLFORM.

I think this is the preferred syntax:

-SET &LF = 'c200/fmtest10.html';

-HTMLFORM &LF



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
May 05, 2010, 11:42 AM
njsden
Yeah, that's the exact syntax I've used.

WebGuy0212, for "design" reasons we've made a decision in our site not to use app folders as part of file names when referring to focexecs or html files in our code and have opted for relying on APP PATH instead.

Using Francis sample code and assuming "c200" is part of a user/group/site APP PATH, you could simply do:

-SET &LF = 'fmtest10.htm';
-HTMLFORM &LF


That way, if later down the road you decide to re-arrange your environment and either rename your "c200" app folder to something else or just move your .htm files to different folders, you only have to make sure APP PATH is adjusted accordingly and your application should keep functioning; otherwise, you will need to track every place where you used "c200/file.htm" and make those changes manually (well, this can technically be automated but it's still a pain).



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
May 05, 2010, 05:42 PM
Waz
quote:
-SET &LAUNCH_FILE = 'approot/lp_app_summary.htm';


Is approot an app directory ?

Typically approot is the root alias for accessing the app directories.

Your usage sould be either {app directory}/{filename} or {filename} if the file is in the path.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 02, 2010, 09:08 PM
icanfocus
I've tried to use the dynamic(&) approach and since I'm calling a launch page outside of the domain, I'm using the fully qualified domain/app/launchpage syntax but always get an error. The closest I've come is..

-SET &ECHO = 'ALL' ;

-SET &STARTER = '-HTMLFORM';
-SET &CALLER = 'callidus/app/callidus_oracle_hr_reconciliation_report';
-SET &STRINGST = '&STARTER &CALLER' ;
-RUN
&STRINGST.EVAL
-RUN
-EXIT

which yields this output....

-SET &STARTER = '-HTMLFORM';
-SET &CALLER = 'callidus/app/callidus_oracle_hr_reconciliation_report';
-SET &STRINGST = '-HTMLFORM callidus/app/callidus_oracle_hr_reconciliation_report' ;
-RUN
-HTMLFORM callidus/app/callidus_oracle_hr_reconciliation_report
-RUN
(FOC1517) UNRECOGNIZED COMMAND -HTMLFORM
CALLIDUS/APP/CALLIDUS_ORACLE_HR_RECONCILIATION_REPORT
-EXIT



Notice how it gets put to upcase in the final call and the -HTMLFORM is not even respected???

Any suggestions???? and Oh yeah, I've tried all the HTMLFORM BEGIN bla bla bla HTMLFORM END variations to no avail...

Has anyone ever done this successfully? The code that's posted here does not work for me whenever an & is introduced.

I'm using DevStudio 7.6.10 with matching WFclient and Server. Weblogic-webserver/linux-reportingserver


8.01m RedHat Linux HTML/PDF/EXCEL
July 03, 2010, 12:47 AM
Dan Satchell
Have you tried:

-SET &CALLER = 'callidus/app/callidus_oracle_hr_reconciliation_report';
-*
-HTMLFORM BEGIN
!IBI.FIL.&CALLER ;
-HTMLFORM END



WebFOCUS 7.7.05
July 03, 2010, 07:59 AM
icanfocus
Dan,

I must admit I didn't try this version of the -htmlform begin and end using the good old bang(!).ibi.fil method. This still didn't make the magic happen.
As suggested I tried....
-SET &ECHO = 'ALL' ;

-SET &STARTER = '-HTMLFORM';
-SET &CALLER = 'callidus/app/callidus_oracle_hr_reconciliation_report';
-SET &STRINGST = '&STARTER &CALLER' ;

-HTMLFORM BEGIN
!IBI.FIL.&CALLER ;
-HTMLFORM END
Which gave me this(echo)

!IBI.FIL.callidus/app/callidus_oracle_hr_reconciliation_report
< !--
-SET &STARTER = '-HTMLFORM';
-SET &CALLER = 'callidus/app/callidus_oracle_hr_reconciliation_report';
-SET &STRINGST = '-HTMLFORM callidus/app/callidus_oracle_hr_reconciliation_report' ;
-HTMLFORM BEGIN
-HTMLFORM BEGIN
(FOC36232) UNABLE TO LOCATE END OF !IBI ESCAPE SEQUENCE.
-HTMLFORM END

WebFOCUS Version 7.6.10 compiled and linked on Tue Sep 29 17:06:02 EDT 2009 (Gen branch7610:187)
-->

and yes I have used this with and without the .htm extension as well.Please ignore the other code as it was just my attempt and making one long calling string which still does not work.

Perhaps theres some client side setting I'm missing which is causing the parser to hose my call....Just a thought

any more suggestions would certainly be appreciated, otherwise I'm looking at an ugly long drawn out goto routine a mile long Music Confused


8.01m RedHat Linux HTML/PDF/EXCEL
July 03, 2010, 10:06 AM
<JG>
Do it the correct way and there is no issue.

!IBI.FIL.XXX; must point to a physical file allocated to the system or be in the current work directory

-SET &CALLER ='callidus/app/callidus_oracle_hr_reconciliation_report.htm';

APP FI CALLER DISK &CALLER.EVAL

-HTMLFORM BEGIN
!IBI.FIL.CALLER;
-HTMLFORM END

Where callidus/app must be under approot otherwise you will need to issue an APP MAP and APP PREPENDPATH / APPENDPATH
or a FILEDEF to the real file. The full file name is an absolute requirement.
July 03, 2010, 10:47 AM
icanfocus
JG

Sounds good, but since I'm working in the domain structure and everything is on the client side and not under the reporting server physically(approot) sounds like I'll need the webserver explicit path to my whatever.htm file. Is that correct. If so, I totally understand. If not, then I must be missing something.Thanks for the correct way as well. FYI I'll be calling .htm pages from multiple domains and just want to be sure that this approach is feasible. Thanks again


8.01m RedHat Linux HTML/PDF/EXCEL
July 04, 2010, 03:37 AM
<JG>
Yes use FILEDEF to allocate the file

-SET &CALLER = 'c:\ibi\WebFOCUS76\basedir\mydomain\app\whatever.htm';

FILEDEF CALLER DISK &CALLER.EVAL
-RUN
-HTMLFORM BEGIN
!IBI.FIL.CALLER;
-HTMLFORM END

Or APP MAP and PREPENDPATH or APPENDPATH

APP MAP LOCATION "c:\ibi\WebFOCUS76\basedir\untitled\app\"
APP PREPENDPATH LOCATION
-RUN
-HTMLFORM BEGIN
!IBI.FIL.whatever;
-HTMLFORM END
July 06, 2010, 12:21 PM
icanfocus
JG

Just completed testing,and works just as suggested with the filedef. This opens up some doors of granularity for control over users until 8.0 gets released. Thanks a bunch, life's good again! Cool


8.01m RedHat Linux HTML/PDF/EXCEL