Focal Point
[SOLVED] Removing Hidden Info from HTMFORM report

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

November 20, 2012, 04:44 AM
In Focus
[SOLVED] Removing Hidden Info from HTMFORM report
Hi folks,

Complete noob in WebFocus and I wonder if someone here would be kind enough to point me in the right direction.

I'm using PHP cURL to pull reports from WF and display those reports within an existing web page. However, when I get the results of an HTMFORM I also get a block of hidden statistics as part of that report. How can I turn this hidden block off?

An example .fex file:
-SET ECHO = OFF;
 SET WARNING = OFF;
 SET MESSAGE = OFF;

 TABLE FILE COMPREPORT1
 HEADING
  "Samples - Last 6 Months"
 SUM CNT.SAMPLE_DATE
 BY END_USE AS 'End Use'
 WHERE MYDATE GE '&MYDATE';
 ON TABLE SET HTMLCSS ON
 ON TABLE SET
  STYLE *
   TYPE=REPORT, GRID=ON, BORDER=1, JUSTIFY=CENTER, $
  ENDSTYLE
 ON TABLE HOLD AS COMP0002 FORMAT HTMTABLE
END
-RUN

COPY COMP0002.HTM &&SP01&&COMPETIT
-RUN

-HTMLFORM BEGIN

<div id="wf_competitor_samplesenduse">
!IBI.FIL.COMP0002;
</div>

-HTMLFORM END


And the resulting HTML returned:
<STYLE TYPE="text/css">
<!--
TABLE { border-collapse:collapse; }
TD { vertical-align:top; padding-left:6pt; padding-right:6pt; }
.x2 { text-align:center;
 border-style: NONE; }
.x3 { text-align:center;
 border-top: 1.00pt SOLID #000000; border-bottom: NONE; border-right: NONE; border-left: NONE; }
-->
</STYLE>
<TABLE CELLPADDING=1>

*** table data removed for brevity ***

</TABLE>
</div>
 
<!--
0 HTML FILE SAVED ...
1 file(s) copied.

WebFOCUS Version 7.6.5 compiled and linked on Mon Apr 28 23:11:00 EDT 2008 (Gen branch765:197)
-->


I'd like to remove that last bit of hidden html within the < !-- --> block. I've switched some settings off in the top of the .fex file, but I can't find how to get rid of the hidden block, or at the very least the echo's of the file save and copy results.

Thanks,
Dave

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


WebFOCUS 7.65
November 20, 2012, 08:41 AM
Mighty Max
Take a look at this post. [CLOSED] Remove Comments in HTML
I modified cgivars.wfs on 7.6.10 Hotfix 12 but it does not seem to work.
The workaround that used on a previous project of mine was to use a javascript regular expression to filter out the html comment.
Don't know if this is an option for you. I would also open a case with IBI.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
November 21, 2012, 04:51 AM
In Focus
Thanks for the link Max, unfortunately I already have MESSAGE|MSG set to OFF, which doesn't remove the comment in regard to file copies.

I'm not too worried about removing the version line, but the file(s) copied is bugging me. (I could remove the entire block via PHP as part of the cURL process, but I figured there must be a WF flag to just turn it off.)

Maybe the cgivars.wfs IBIWF_showInfo setting takes the entire block out (can't find any docs about that setting), but I don't have access to that file anyway.


WebFOCUS 7.65
November 21, 2012, 10:38 AM
GamP
SET EMGSRV=OFF
SET MESSAGE=OFF

If you put these two lines in your procedure, the statistics won't be shown anymore.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 21, 2012, 10:45 AM
GamP
The '1 file(s) copied' however comes from somewhere else, probably the OS, but not from WF.
You could specify with your copy command to store the output of the command in a file. For instance with [code]copy /y file newfile > copy.out[/copy]


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 29, 2012, 04:24 AM
In Focus
Thanks GamP, just what I needed!

EMGSRV setting switched off the error reporting

/y didn't work as it just suppresses overwrite prompts, but you put me on the right path. WF is indeed just running the dos COPY command, so it was just a matter of sending the result to null...

COPY file.ext dest.ext > null

So, the full settings I now have, which appear to hide all hidden comment messages except the WF copyright, are...

SET WARNING = OFF;
SET MESSAGE = OFF;
SET EMGSRV = OFF;

and any -COPY commands have > null on them

Job's a good'un.


WebFOCUS 7.65