Focal Point
[CLOSED] Auto-Refresh

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

December 02, 2016, 11:38 AM
Joe Beydoun
[CLOSED] Auto-Refresh
I was running this within Dev Studio, works fine in the portal.

I run the code below and when the page refreshes, I get a "No query information to decode" message. All Help appreciated!

TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"CAR REFRESH TEST"
"AT &TOD"
ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN


-HTMLFORM BEGIN


<script language="JavaScript">
function doReload()
{
setTimeout( "location.reload(true);", 2*1000 );
}




!IBI.FIL.H001;


-HTMLFORM END

This message has been edited. Last edited by: Joe Beydoun,


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
December 02, 2016, 12:56 PM
Squatch
TABLE FILE IBISAMP/CAR
SUM
CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
HEADING
"CAR REFRESH TEST"
"AT &TOD"
ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN

-HTMLFORM BEGIN

<script language="JavaScript">
function doReload()
{
setTimeout( "location.reload(true);", 2*1000 );
}
</script>

<body onload="doReload()">
!IBI.FIL.H001;
</body>

-HTMLFORM END



App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
December 04, 2016, 11:21 PM
David Beagan
You could do something like this:
 
 SET STYLE=ENDEFLT,LINES=998,PAGE=NOLEAD
 TABLE FILE ibisamp/ggsales
 "Refresh Test"
 "On &DATEMDYY - &TOD"
 SUM COMPUTE rand/P9.7      = RDUNIF('P9.7'); NOPRINT
     COMPUTE Dollars/P12.2M = DOLLARS * rand;
     COMPUTE Units/P12.2C   = UNITS * rand;
 BY REGION
 ON TABLE HOLD AS REPORT01 FORMAT HTMTABLE
 END
-RUN
 
-SET &Rand = RDUNIF('P9.8')* 10000000;

-HTMLFORM BEGIN
  <!DOCTYPE html>
  <body onload="setTimeout('document.f1.submit();',2000);">
  <form name=f1 action="/ibi_apps/run.bip" method="get" target="_self">
  <input type="hidden" name="BIP_REQUEST_TYPE" value="BIP_RUN">
  <input type="hidden" name="BIP_folder"       value="IBFS:/WFC/Repository/Public">
  <input type="hidden" name="BIP_item"         value="rerun.fex">
  <input type="hidden" name="Rand"             value="!IBI.AMP.Rand;">
  !IBI.FIL.REPORT01;
  </body>
  </html>
-HTMLFORM END
 


Note that for WebFOCUS 7.X the action and parms would be different.


WF 8.2.03
Win10 / IE11 / Chrome
HTML EXL2K PDF et. al.
December 05, 2016, 03:27 AM
Tony A
Just to explain to you why your carefully crafted code will not work the way that you think it should.

Once your report is created and stored in the temporary file H001.FTM, it is pulled into the HTML output and delivered to the end-user's browser. The URL at this point will be something like - "http:/yourserverRazzerort/ibi_apps/WFServlet?" with nothing else.

The JavaScript will then set a timer to reload the location every 2 seconds and it will do just that, try and load the URL.

Your problem is that this URL will do nothing because is not linked to anything remotely useful in furnishing your report back to the screen. Just run your report without the HOLD and -HTMLFORM and then hit F5 to refresh the screen - this is what your JavaScript is essentially doing.

The solution that you need is to run a URL that provides WebFOCUS with everything that it requires to rerun your report, and David has given you a solution - by introducing a FORM to your output which contains the necessary controls to form the URL required.

If you do not comprehend how the HTML form elements achieve this then perhaps it would be a good idea to gain some insight by looking at some tutorial sites such as W3Schools where you can get a reasonable understanding of HTML, CSS, JavaScript etc.

Good luck!!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10