NetTalk Central

Author Topic: NetWebForm URL on Save  (Read 5619 times)

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
NetWebForm URL on Save
« on: March 28, 2012, 01:21:09 AM »
Hi Everyone,

I'm having difficulty getting the URL on Save to work on a NetWebForm. The Form is a 'Report Selector' with lots of drop downs, date selects and check boxes that I would like to be able to run several PDF reports from. I set the PDF report procedure name as the SSV but the URL on Save doesn't seem to like having a GSV value. Is there any other way of doing this?

Thanks,
Trent

Rob de Jager

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: NetWebForm URL on Save
« Reply #1 on: March 28, 2012, 01:39:30 AM »
Hi Trent,

Firstly the gsv value must be already set when you open the form. If the form is popup; I have had no success getting the form to open a different url on save or cancel, other than back to the browse the form was called from.


Rob
« Last Edit: March 28, 2012, 06:03:59 AM by Rob de Jager »

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: NetWebForm URL on Save
« Reply #2 on: March 28, 2012, 02:06:51 AM »
Hi Rob,

Thanks for the reply. The SSV is being done when a drop down is selected on the Form so the GSV is not set when the Form opens.

I will try another way :)

Thanks,
Trent

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: NetWebForm URL on Save
« Reply #3 on: March 28, 2012, 04:30:39 AM »
what you can do is add your own save button (untick the one on the template) and then refresh this after you set/change the SSV after a selection from the drop list.

There may be a way to refresh the template save button in NT6 but the above is how I used to do it on NT5

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: NetWebForm URL on Save
« Reply #4 on: March 28, 2012, 04:21:45 PM »
Hi Kevin,

I have created a new 'Print' button on the Form which works per what the GSV is. But I am having an issue with the PDF file name. I set a Global Data variable to be 'web\reports\$$$SessionID.pdf' which the report is printing correctly to but I get an error on the web page 'The Print procedure failed to create the PDF file [web\reports\$$$DifferentSessionID.pdf]'.

Why would this be trying to open a pdf with a different file name?

Regards,
Trent

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: NetWebForm URL on Save
« Reply #5 on: March 28, 2012, 04:22:58 PM »
Forgot to mention I'm using Nettalk 6.26 and PDF-Tools Global Extension v4.1.

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: NetWebForm URL on Save
« Reply #6 on: March 28, 2012, 05:03:05 PM »
possibly because you are using a global data variable which you shouldn't do.

I set my filename as a local variable and SSV it and then just pass that to my report engine and use the SSV to push it out to the browser.

I use the techniques in the servedocument example to publish the report as I'm using L&L to create the PDF or HTML.

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: NetWebForm URL on Save
« Reply #7 on: March 28, 2012, 05:27:04 PM »
I understand where I went wrong now. Instead of setting the 'Print' button URL to the report procedure, you set the URL to the PDF File Name GSV and tell the form to call the report procedure.

Thank you for helping me understand this.

Regards,
Trent

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: NetWebForm URL on Save
« Reply #8 on: March 28, 2012, 07:37:57 PM »
OK I only have one issue left now. I can create the report but when the report opens in Adobe (by clicking the URL on Save button in the Form) Adobe shows an error message:

File does not begin with '%PDF-'.

Has anyone else seen this? If you click OK on the error message and re-load the report from the address bar the report opens without any issues.

Regards,
Trent

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: NetWebForm URL on Save
« Reply #9 on: March 28, 2012, 08:33:33 PM »
Don't worry about the last question, fixed by using the correct PDF extension...