NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: johanco123 on October 30, 2013, 05:38:01 AM

Title: How do I call Procedure in code
Post by: johanco123 on October 30, 2013, 05:38:01 AM
Hi Bruce,

I have a button on a memory form with code behind the button. I want to call tot run a different procedure depending on conditions of selection criteria previously. There will be several conditions like the example for the same button.

   If p_web.GSV('SV_loc:ReportSession')=248 
      p_web.SSV('Value',12)
      ViewProgressPage(p_web)
   END

Normally I could use this in the URL as 'ViewProgressPage?value=12'

How can I do this in the example code above.

Regards
Johan
Title: Re: How do I call Procedure in code
Post by: Bruce on October 30, 2013, 05:48:26 AM
Is ViewProgressPage a NetWebPage?
A page cannot be embedded on another page, so you can't call a page as an ajax reply.

I recommend you move the "common" part of the page into a NetWebSource - then you can call the NetWebSource from the page itself, and also from this part.

I set a value before the call do
p_web.SetValue('value',12)
SomeNetWebSource(p_web)


cheers
Bruce
Title: Re: How do I call Procedure in code
Post by: johanco123 on October 30, 2013, 09:35:34 PM
Tanks Bruce

ViewProgressPage is a NetWebPage
I change it to a NetWebSource with the settings above, it is running the process, but it does not display the pdf report.(Open the new PDF window with the report)

Any Suggestions
Tanks
Johan
Title: Re: How do I call Procedure in code
Post by: Bruce on October 31, 2013, 01:20:58 AM
what report? how does a report fit into your netwebsource?
did the browser ask for a report? or did the user just press a button?
Title: Re: How do I call Procedure in code
Post by: johanco123 on October 31, 2013, 03:01:24 AM
Hi Bruce

I change to call the netwebsource procedure out of the button procedure and not out of the embedded code. This is working now.

the only problem now is sometimes the report is a long report, then the webpage timeout before the pdf is created.

Any Suggestions

Regards
Johan
Title: Re: How do I call Procedure in code
Post by: urayoan on October 31, 2013, 06:00:31 AM
johanco, in my case o resolve that problem using a progress bar.

Another function that works is using p_web.noop but visually for the client, the progress bar is helpful let them knows that something is happen behind the scenes.

Cheers