[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 SwapnilThis 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;
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