Page 1 of 1

VLF - One CSV Download

Posted: Sat Apr 22, 2017 12:26 am
by Eugene
HI,
I'm trying to download a CSV file from a filter in VLF-One. The filter has a button which executes a server routine to download the CSV. This routine creates the list and transforms it into a CSV which is then sent back using the Response. The code I'm using is based on the examples shipped with LANSA's sample and examples (xDemoWebCSV calling xDemoWebDataServices.DownloadCSV) and also similar work I've done for customers (this was using LANSA Web Pages). This is the first time I've tried to add this functionality into VLF-One.

When I press the download button the code is executed and the spreadsheet is down loaded successfully. However the VLF session gets ended and a message is displayed in the browser 'Loaded 599 objects and 4200 properties'. I've checked the built in instance list download facility and that works with out ending the session.

Has anyone created there own CSV downloads in VLF-One? If so how does the code differ to that for standard VL Web Pages? or am I doing something wrong?

Thanks in advance your help.

Eugene

Re: VLF - One CSV Download

Posted: Sat Apr 22, 2017 9:08 am
by MarkD
The VLF shipped demo has some upload and download examples.
Example 4 (reusable part DF_T68H40) has CSV and TXT file download examples.
Are you using the Target(New) parameter like the example does:
Capture5.JPG
Capture5.JPG (65.52 KiB) Viewed 1056 times

Re: VLF - One CSV Download

Posted: Tue Apr 25, 2017 1:01 am
by Eugene
Hi Mark,
Thanks. I missed that one. It now works.
Best Regards,
Eugene