NetTalk Central

Author Topic: Writing to web\reports folder - Multi-App Host exe problem  (Read 5288 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Writing to web\reports folder - Multi-App Host exe problem
« on: March 07, 2016, 07:04:48 PM »
I have  a new app added to my many dll apps hosted by the Host.exe app.  It runs fine but I have an issue.  In code I have added the QuickPDF library.  The idea is to use it to fill in a pdf before printing.  See the attachment for a sample of my code.

At the top of the code, I attempt copy a blank pdf to the web\reports folder, after renaming the pdf.  This does not seem to work...no pdf is copied to the reports folder.  This does work when I run the dll app as a local exe webserver.  Thus, I get an error from the QuickPDF.LoadFromFile method.  Is there a trick to writing to the web\reports folder?  I'm on C10.0.11987 and NT 9.06.

Thanks,

Jeff King


terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Writing to web\reports folder - Multi-App Host exe problem
« Reply #1 on: March 07, 2016, 11:20:06 PM »
I would suggest using p_web._trace just after the copy command
IF ERRORCODE()
 p_web._trace('error ' & CLIP(ERROR())
END
It may explain why it didn't copy
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Vinnie

  • Full Member
  • ***
  • Posts: 182
    • View Profile
    • Email
Re: Writing to web\reports folder - Multi-App Host exe problem
« Reply #2 on: March 07, 2016, 11:45:35 PM »
Hi Jeff

If your new app is running from a different folder from the host.exe folder   
check the web\reports folder in the host.exe  folder.

It maybe saving to the wrong folder web\reports.

Cheers

Vinnie

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Writing to web\reports folder - Multi-App Host exe problem
« Reply #3 on: March 08, 2016, 06:29:34 AM »
Thanks guys....turns out by placing the original blank PDF in the host.exe folder, it is now able to find it.  The filled PDF does indeed get sent to the web\reports folder of the Host.exe.

Now for a second question, if I label the newly created PDF with leading $$$, will it get removed automatically?

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Writing to web\reports folder - Multi-App Host exe problem
« Reply #4 on: March 08, 2016, 10:02:17 PM »
>> Now for a second question, if I label the newly created PDF with leading $$$, will it get removed automatically?

it'll be removed after the request from the browser. It has to be requested to be removed though.

cheers
Bruce