FoxInCloud
Heavy Report
Gravatar is a globally recognized avatar based on your email address. Heavy Report
  Arcadio Bianco
  All
  Jun 23, 2020 @ 04:57am

Hi!

What is the best way to generate a heavy report (Multiple queries and pages) using FoxInCloud. Any tips?

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  Jun 24, 2020 @ 01:33am

Hi Arcadio,

What kind of tip are you looking for? reduce response time, reduce user waiting time, other?

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  Jun 24, 2020 @ 05:12am

Hi, Thierry!

A report that takes 10 minutes to generate. Foxincloud will generate me timeout errors. Right?

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  Jun 24, 2020 @ 09:27am

You just need to expand Timeout in wc.ini to 600 (secs.), or more if you see fit.

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  Jun 24, 2020 @ 09:39am

Have you ever done something asynchronous?

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  Jun 25, 2020 @ 02:35am

FoxInCloud has no such feature; you can look at Web Connect's wwWebAsyncRequest

Otherwise if your report can be generated by an independent procedure, you can do the following:

  • JS Event handler:
    1. collect report parameters from controls on the form (jQuery("#ID").val()…)
    2. send an async AJAX request to a dedicated xxxProcess.myReport() method with report parameters as form name-values pairs
    3. As AJAX request call back, display a 'report complete' message with a link to the report in some Bootstrap Notify 'window'
  • xxxProcess.myReport() does the following:
    1. collect report parameters using request.form()
    2. run report in independent procedure with parameters
    3. copy PDF report into site's temp folder with user's ID added to file stem for uniqueness and confidentiality (you can use this.oAJAX.FileToSiteTempDir())
    4. return JSON result including URL to the temp/report_userID.pdf; the above AJAX request call-back processes this result.

Benefit of that procedure is that user can continue working until the report is complete; however he/she must stay in the same page for the call-back to execute properly.

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Arcadio Bianco
  Arcadio Bianco
  Jun 25, 2020 @ 09:50am

It would be interesting if you had a small example in the live tutorial of the following steps. It's definitely something that would be really cool for the product.

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  Jun 25, 2020 @ 10:35am

OK will try to do soon

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  Jun 25, 2020 @ 12:07pm

Great! Thank you!

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Tore Bleken
  Arcadio Bianco
  Jun 25, 2020 @ 12:40pm

I had a similar need many years ago. My web application simply created a text file with a random name in a special folder, this text file included all the necessary details to define the report, plus the email address to the one who asked for the report. A second program regularly checked the folder in question, and if a file was found, it was analyzed and the report was created as a PDF. Then the PDF was simply sent as an email attachment. The second program was also responsible for deleting old PDFs in order to avoid storing unnecessary files.

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Tore Bleken
  Jun 25, 2020 @ 11:34pm

Nice solution, thanks Tore

Arcadio, does it fit your immediate need?
(while I remain committed to adding an example to FLT's reporting sample form 😉)

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  Jun 26, 2020 @ 06:35am
Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jun 26, 2020 @ 08:23am

Hi Thierry,

Elegant !

I see you are using notify ()?

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jun 26, 2020 @ 08:28am

Yes!

In FoxinCloud V 2.31.0-beta.4, just added xxxServer.lBSnotifyAdd to load Bootstrap Notify and Animate.css automatically.

Credits to you for discovering this utility!

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jun 26, 2020 @ 08:33am

Maybe a track for wWait ?

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  Jun 26, 2020 @ 12:37pm

Thierry!

Great! Speechless! Thank you!

Gravatar is a globally recognized avatar based on your email address. re: Heavy Report
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jun 26, 2020 @ 02:04pm

À wait message needs be triggered on server side; let me think about it.

© 1996-2020