Focal Point
[SOLVED] HTML Compound Report going to Infinite Loop.

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

May 03, 2010, 09:50 AM
Swap
[SOLVED] HTML Compound Report going to Infinite Loop.
Hi,

I am trying to generate a compound HTML report where the count of number of reports is dynamic.
Following is the sample code snippet.

-REPEAT LOOP_HTML FOR &CT FROM 1 TO &LOOP_CNT
TABLE FILE CAR
PRINT MODEL
WHERE CTR EQ &CT
ON TABLE HOLD FORMAT HTMTABLE AS REPORT&CT
END
-RUN
-LOOP_HTML
-SET &J=0;
-HTMLFORM BEGIN
-GENERATE
-SET &J=&J+1;
!IBI.FIL.REPORT&J;
-IF &J LT &LOOP_CNT THEN GOTO GENERATE;
-HTMLFORM END

The problem is that above code is running in an infinite loop and I am not able to figure out where the problem is.

Please help

-Regards
Swapnil

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


Webfocus 7.7.03
Windows XP
Excel, PDF, HTML, APDF, AHTML, Maintain
May 03, 2010, 10:00 AM
fatboyjim
Hi,

Maybe you should put the non-HTML code outside the HTMLFORM BEGIN and END.

ie. -SET &J=&J+1;
-IF &J LT &LOOP_CNT THEN GOTO GENERATE;

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
May 03, 2010, 10:06 AM
Swap
I solved it...

There was a GOTO statement which is a starting condition to select the format. The program was again and again repeating the same thing. i.e. it was again calling the code for HTML.

Thanks anyways for your help.


Webfocus 7.7.03
Windows XP
Excel, PDF, HTML, APDF, AHTML, Maintain