Focal Point
[CLOSED] Add ouput amper variable to existing HTML layout page

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

April 08, 2011, 02:32 PM
Norb Eckert
[CLOSED] Add ouput amper variable to existing HTML layout page
Hi All,

I have a set of existing launch pages that now need to have an output option added to them. The fexes were all PDF output before and now the request is for HTML, PDF, Excel.

Is there a way to create a control, add an amper variable, and pass the value to the fex without reimporting the fex back into the HTML page?

Had these launch pages not been generated via the HTML Layout tool I would add the code and run the fex with the output parameter and life would be good.

Thanks,

Norb

This message has been edited. Last edited by: Norb Eckert,


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
April 10, 2011, 05:40 PM
Waz
You should just be able to add the HTML to the page, what does the source look like ?


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!

April 11, 2011, 06:51 AM
Lucas
add this to your existing web page...
File output:
<SELECT name="OUTPUT">
<OPTION VALUE="WP" SELECTED>WP
<OPTION VALUE="EXCEL">EXCEL
<OPTION VALUE="PDF">PDF
<OPTION VALUE="HTML">HTML
</SELECT>


in your fex.....

TABLE FILE BLAH
FOCUS CODE HERE....
....
....
ON TABLE PCHOLD FORMAT &OUTPUT
END 


is this what you were looking for?


7.6.6 Mainframe
7.6.4 Web Focus
Windows

April 11, 2011, 04:05 PM
Norb Eckert
Hi Waz,

The page was generated using HTML layout which contains all sorts of additional attributes and code that is used by IB. It's an absolute hairball from a code viewpoint. I have no idea what the format should be looking like. Normally, I would add normal
<select>  
code but somehow I have to bind the &WFFMT variable to a control and get it passed via IB's mechanism.

I was able to reimport the fex into the page whereupon it recognized the new amper variable and it created a new control and added it's own coding to the page. Because there are so many "behind the scenes" connections to underlying IB code I suspect that this is the only way I'll be able to add this amper variable and get it to be passed properly. I need to do this with about 75 reports and this is gonna take forever to do with this process. What a complete downer.

I imagine that all the extra attributes in the HTML are related to the WYSIWYG nature of the tool and the special IB back-end connection code. UGH!!!

Thanks,

Norb


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
April 11, 2011, 04:09 PM
Norb Eckert
Hi Lucas,

The code that you suggested would be part of the solution if I was rolling my own page but I need to integrate a new amper variable into a page that was generated with the HTML layout tool and this has all kinds of hooks in it. I needed to use the tool I'm afraid.

Thanks,

Norb


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
April 11, 2011, 05:52 PM
Waz
If you have done this for one report, can you compare the old and new, to determine what the change was ?


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!

April 11, 2011, 06:46 PM
Norb Eckert
Hi Waz,

I did look at the new code to see the differences and it's just a hairball. Many references and non-standard tags (to me at least)sprinkled around that reference my "wffmt" output element. There are lots of controls, identifiers, and attributes on the page and I'm concerned that I may end up breaking something so I'm gonna just bite the bullet and use the tool to add the new variable/control to the HTML pages.

Frankly, I just think it's easier and cleaner to code the stuff myself with divs, CSS and javascript but I understand IB's thinking for providing the HTML tool. And I know that many people would disagree with me on NOT using the layout tool. I do think that the code generated could be updated and use more current styles and practices.

Thanks,

Norb


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
April 12, 2011, 09:16 AM
ABT
Maybe you could split the difference (going forward, of course). I've always been a tad confused by those who say they code their own HTML instead of using the tool. As you say, the output is just so dang hairy that I felt it was impossible to do so.

But. I have noticed there seems to be a pattern where all the XML stuff it needs to function is down towards the bottom. Maybe there is a way that you can create a default layout (in your own tools), and apply this layout (thinking the 'Drag your file into this window' default message on a new HTML page create in the HTML Layout Painter). After, use the Form controls to associate to your destination FEX, and then edit the form controls to remove styling and positioning. Seems like it'd work.

Lastly, I know you'd lose functionality, but what about coding a standard HTML form, name your form controls the same as the internal vars, and put your fex destination as the form action? THere'd be more to this, of course, but you see what I mean, right? would this be doable?

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
April 12, 2011, 04:24 PM
RReeder
Norb,

in fex add:
ON TABLE PCHOLD FORMAT &WFFMT.(,,).Select type of display output.


On you parameter pages add another selection criteria box (radio, dropdown, etc.). On properties change the unigue id to the same name as the new field in this case WFFMT.

Go to the parameters tab, find the new dropdown field named WFFMT and select it. ADD you values for drop down selection parameters, ie. HTML, PDF, EXCEL.

It should work without you have to re import the report.


7.6.10 Oracle 10g Windows XP