NetTalk Central

Author Topic: Print button and running reports  (Read 2974 times)

LSlowick

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Email
Print button and running reports
« on: October 30, 2014, 05:37:25 AM »
My report is working via button on the form. I am setting a session variable 'orderno' in the forms 'preUpdate' embed that I am getting in the report procedure. This is working.

The report procedure can accept two values ... "orderno' and optionally 'phaseno'. If phaseno is zero it prints all phases.

I want to have two buttons on this form/tab

1) I added button to the BrowsePhase (on each row). When the user presses that button what embed or how do I  set the two sessionvalues for passing to the report procedure. I want to ssv('orderno',oeo2:orderno) and ssv('phaseno','oeo2:phase)?

2) On the form I have just the plain 'print' button to call the same report but I only want to pass the 'orderno'. I'm guessing I would have to clear the value in the 'phaseno' sessionvalue. What embed would be used for a button on the form to set these? This would replace the code I used in the preupdate embed.

Thanks
Lee


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Print button and running reports
« Reply #1 on: November 03, 2014, 11:09:30 PM »
Hi Lee,

I think the latest webinar may help a bit with answering this question;
http://www.capesoft.com/accessories/NetTalkUserGroup.htm
Webinar #41, Rays question around the 57 minute mark.

the short answer is that parameters for a report are passed as parameters, and not as Session Values.

cheers
Bruce

LSlowick

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Email
Re: Print button and running reports
« Reply #2 on: November 04, 2014, 06:25:04 AM »
Bruce

I wish I had that webinar about a week or so earlier... great information. After quite a bit of digging on my own I basically came to the same conclusion and used the parameters field on the button as you showed in the webinar. Works perfect for both my situations.

Thanks
Lee