VLF-ONE Send To Excel

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VLF-ONE Send To Excel

Post by jyoung »

In VLF-ONE you can get a CSV from an instance list via the "Send To MS-Excel" menu item.

How is VLF-ONE doing this?

I have a custom instance list where I need to customize the excel file.

Are you doing something with #PRIM_WEB.HttpRequest and setting the content and headers?

I found the uSendToXL method to redefine but don't really know where to go from here. When I try to redefine the uSendToXL method it never gets called.

Thanks,
Joe

Edit

Tracing the method (uses a custom "application" aka framework manager)

Code: Select all

mthroutine name(uSendtoXL) options(*REDEFINE)
#CMGApplicationManager.avFrameworkManager.avRecordTrace component(#COM_OWNER) event("uSendToXL")
endroutine
Shows the method is never getting invoked.
Capture.PNG
Capture.PNG (41.82 KiB) Viewed 8088 times
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Send To Excel

Post by MarkD »

You need to add your own selection option to initiate the send.
In the current VLF version uSendtoXL does not get invoked.

Regarding the HTTP part - see shipped Upload Download example 4.
Client reusable part is DF_T68H4O, server module is DF_T68DSO - routine uMakeCSVFileAsResp.
We also have a new untested example to ship in the next version that makes and displays CSV data entirely on the client.
Let us know if you need that an we can post that code.
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VLF-ONE Send To Excel

Post by jyoung »

If I need to add my own selection, meaning another button right, the user will have two options to download the data. My new button and the built in VLF menu item.

That also means that on a different list, the user has a different way of downloading the data as well, the VLF menu item instead of a custom button. I could see this being confusing for the user as the interface is not consistent.

So there is no way to hook into to the menu item that is already there?

Edit: I just recalled I could disable it in the framework tool. But I would still rather the UI be consistent.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Send To Excel

Post by MarkD »

All understood. In the next version (EPC141034) your overwritten uSendtoXL method will be invoked when the VLF default button is used.
So if you put your code in uSendtoXL now, and invoke it from your own button (hiding the VLF button) then you can later remove your button.
We also changed this area quite substantially to make sure what went into the spreadsheet exactly matches what the user is seeing.
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VLF-ONE Send To Excel

Post by jyoung »

Thanks Mark.

Of course, since you mentioned it, I have to ask. :D

Any ideas on when the next EPC will be out?
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Send To Excel

Post by MarkD »

Sometime in July I hope.
Post Reply