Focal Point
HTMLFORM command

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

September 09, 2011, 05:14 PM
DD
HTMLFORM command
Hi,
Can some one guide me why this code does not work?

-SET &L_HTM_FORM = 'testdoma/app/test_uat';
-HTMLFORM &L_HTM_FORM

It throws an error: ERROR: ERROR_MR_FEX_NOT_FOUND Can't create item object based on provided item key &L_HTM_FORM.htm

Thanks,
Ram.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
September 09, 2011, 05:51 PM
njsden
Ram,

-HTMLFORM and -INCLUDE require an actual file name to be provided *before* parsing time in the MRE.

What you want to achieve (use dynamic form names via amper variables) can only be done in the Reporting Server -- MRE dialogue manager is a bit "less flexible" so to speak.



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.
September 09, 2011, 05:53 PM
DD
Thank You!!!
Yes, we need to pass the html form name dynamically at runtime. We get this file from oracle table


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
September 09, 2011, 07:56 PM
njsden
Hmmm, the only choices I see are:

1. Move all your forms to the Reporting Server so -HTMLFORM &myform works ... not so simple, especially if they have internal references to MRE objects (domains, folders and .fex files)

2. If the list of possible .htm files is "manageable" you can add -HTMLFORM for each .htm file branching to the appropriate one depending on &_HTM_FORM. Somehitng like this:
-IF &L_HTM_FORM EQ 'testdoma/app/test_uat' THEN GOTO :FORM1;
-IF &L_HTM_FORM EQ 'testdoma/app/test_dev' THEN GOTO :FORM2;
-IF &L_HTM_FORM EQ 'testdoma/app/test_prd' THEN GOTO :FORM3;
-IF &L_HTM_FORM EQ 'otherdom/app/other_form' THEN GOTO :FORM4;
-*
-* ... more -IF's as needed
-*
-TYPE Form &L_HTM_FORM not recognized! Call Ram for support! :)
-EXIT
-*
-* Load form
-:FORM1
-HTMLFORM testdoma/app/test_uat
-GOTO :ENDFORM;
-:FORM2
-HTMLFORM testdoma/app/test_dev
-GOTO :ENDFORM;
-:FORM3
-HTMLFORM testdoma/app/test_prd
-GOTO :ENDFORM;
-:FORM4
-HTMLFORM otherdom/app/other_form
-GOTO :ENDFORM;
-*
-* ... more -HTMLFORM's as needed ...
-*
-:ENDFORM
-* ... Continue process ...


As you will end up creating a .htm file anyway for each new form reference you add to your database, it is just a matter of discipline to always adjust this routine and add the proper -IF/-HTMLFORM for it.

Not perfect, but I think it's easier to implement and maintain than option 1.



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.
September 10, 2011, 10:33 AM
DD
Thanks njsden. Option1 is tough to implement as you said, the html form stores domain, folder, subfolder names in it.
But option2 is great idea. I can generate those IF else lines by writing small oracle PL/SQL package for all the forms as they were stored in a table.
The other thread: on the Fly Fex pointing was also opened by my friend for the same purpose. Since it is not possible to pass a parameter in the self service app link to Fex, we are trying to create a pointer Fex and read the report_id paramter in the url and set prependpath and build html launch page and call it using HTMLFORM command. It is very simple, but the HTMLFORM restriction (can't parse amper variable) killed this simple solution.

Thank You Verymuch for your time and help. Really appreciated.

DD.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF