NetTalk Central

Author Topic: Passing a variable from a Net Web Form to a Report - how?  (Read 2247 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
    • Email
Passing a variable from a Net Web Form to a Report - how?
« on: January 05, 2017, 03:54:44 PM »
Hi all,
I have a login form, which during the processing in the  validate update embed,  prints a report.
The form code works, the report is called ,but the variable I am  trying to pass is not seen by the report, so the detail being fetched from inside the report code is not found and the report is blank.
STOP returns the  variable as blank.
I have tried getting the sessionvariable instead but that fails as well.
I have set the report  window property prototype and parameter the same, as:
(<NetWebServerWorker p_web>)
Page 45 in your book, Bruce refers...
the report name is Printdetails  and Im trying with pmealcode which is a string

Is the issue not having the pmealcode included in the prototype being passed on  the Window properties?
If I do this, compiling returns the error:  "No matching prototype"


ALSO is there a webinar on this topic?
 
many thanks
Richard




Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11197
    • View Profile
Re: Passing a variable from a Net Web Form to a Report - how?
« Reply #1 on: January 06, 2017, 05:00:17 AM »
Hi Richard,

>> ,but the variable I am  trying to pass is not seen by the report,

passing variables is usually done using the ValueQueue. so in the calling procedure (LoginForm?) you'd have

  p_web.SetValue('something','somevalue')

then in the report procedure you'd presumably put that into some local variable for use in a report filter or whatever

  whatever = p_web.GetValue('something')

cheers
Bruce