NetTalk Central

Author Topic: How to Approach Creating File and sending it to User  (Read 4156 times)

springguy

  • Full Member
  • ***
  • Posts: 195
    • View Profile
    • Email
How to Approach Creating File and sending it to User
« on: August 01, 2012, 06:34:11 AM »
Running Clarion 6.3 ABC and NetTalk 6.38

I have a customer request where the remote user needs to click a button which will run a procedure that reads a TPS file and creates a CSV file on the server and once the file is created, they want the server to send the file to the user's computer.  So, from the user's point of view, they click a button and a CSV file shows up on their computer.

Can that be done and what would you recommend as a best approach to accomplish this?
Thanks,
Mike Springer

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to Approach Creating File and sending it to User
« Reply #1 on: August 01, 2012, 05:32:57 PM »
yes - have a look at the Excel example. The same principle applies. It really depends on the users browser if it will just open the csv file or ask the user what to do with it after it downloads. If its a really big CSV file then you need to keep the users browser alive whilst the file is created otherwise it might timeout before the download begins.

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: How to Approach Creating File and sending it to User
« Reply #2 on: August 01, 2012, 06:04:12 PM »
Hi,
Kevin is one step ahead of me.  I have a button that basically executes clarion code and builds a PDF file.  When the file is built, I display a link with the file name and my users press the link and down comes the file for them... All straight forward and easy!
FWIW,
Ron Jolda

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to Approach Creating File and sending it to User
« Reply #3 on: August 01, 2012, 09:34:03 PM »
I'm not sure about that. I use a couple of other techniques including emailing files and running long reports and process's on background threads so users are free to keep working. Displaying a link when a file is ready is a good method.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to Approach Creating File and sending it to User
« Reply #4 on: August 01, 2012, 10:04:40 PM »
you also might want to read the NT6 "update" doc - the Progress bar controls can be applied to this situation. So the user can see the progress of the file being created, then when it's ready the progress bar turns into a link.

Cheers
Bruce