NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: MikeR on February 24, 2016, 02:26:31 AM

Title: NetwebBrowse with export button with a local variable
Post by: MikeR on February 24, 2016, 02:26:31 AM
I have a netwebbrowse
with a local field loc:totalvalue
it is calculated as tbl:untprice * tbl:quantity
in the browse it shows correctly
however on the export it exports a zero value

Title: Re: NetwebBrowse with export button with a local variable
Post by: Vinnie on February 24, 2016, 03:23:34 AM
I am sure That's how it works.

The Export only exports from the queue but the local variable is not in the queue.

Title: Re: NetwebBrowse with export button with a local variable
Post by: MikeR on February 24, 2016, 03:49:23 AM
Thanks Vinnie do you know if there is a embed point where I can calculate it
Title: Re: NetwebBrowse with export button with a local variable
Post by: Vinnie on February 24, 2016, 03:58:20 AM
No Sorry Mike I can not help with an embed point.
I guess you can not change the data file structure.

I create a in memory file for the export data and export that rather then the tps file.

Not sure this is the best and only way.


Title: Re: NetwebBrowse with export button with a local variable
Post by: terryd on February 24, 2016, 05:23:29 AM
Hi Mike
I have had this situation
If you search the source in the browse for
Start of "ExportToExcel routine After Headings"
There is a loop after this which is exporting your view to Excel
In the start of "Set Queue Record" in the loop
you can add your calculation of the local variable.
What I tend to do now with local variables that I want to export is create a Procedure routine when I create the local variable then in the browse and in this export embed I call the  ProcedureRoutine where the value is calculated (ensures that the browse and Export agree)