Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
Home arrow Forum arrow NetTalk Web Serverarrow Web Server - Ask For Helparrow NetWebYear - embed point for SetSessionValue of clicked date
NetTalk Central
December 22, 2014, 06:12:00 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: NetWebYear - embed point for SetSessionValue of clicked date  (Read 626 times)
sukhendu
Jr. Member
**
Posts: 77


View Profile Email
« on: April 27, 2012, 08:55:34 AM »

Looking for an embed point on NetWebYear procedure where the clicked date can be saved to SetSessionValue.

Thanks,
Sukhendu
Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7146



View Profile
« Reply #1 on: April 27, 2012, 08:57:03 PM »

Hi Sukhendu,

More context for your request is required. When you lick on a date on the calendar it usually goes to a form. So, what are you wanting the session value for?

cheers
Bruce
Logged
sukhendu
Jr. Member
**
Posts: 77


View Profile Email
« Reply #2 on: April 28, 2012, 01:46:06 PM »

Hi Bruce,
I don't want it go to a form, instead to a report or another procedure that needs this date (which comes from a table that is loaded on to a NetWebYear).  I could accomplish this on a memory form with a look-up, but I like the looks of calendar layout of NetWebYear better.

Thanks,
Sukhendu
Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7146



View Profile
« Reply #3 on: April 29, 2012, 09:48:22 PM »

ok, so the date is passed to the new procedure as a parameter called
_date_
in the new procedure you should do a
p_web.StoreValue('_date_')
and then use it after that as a session value.

cheers
Bruce
Logged
sukhendu
Jr. Member
**
Posts: 77


View Profile Email
« Reply #4 on: April 30, 2012, 08:56:20 AM »

Bruce,

Yes, but I don't know how to pass the date from the NetWebYear procedure to the new procedure as a parameter called _date_

I can do parameter passing in windows programming, but doing the same in NT web programming has been my biggest challenge so far.    All web procedures has NetWebServerWorker parameter.  How do I add a new parameter on the prototype and then call it into a new procedure.  If there is an example that would be very helpful.

Thanks,
Sukhendu
 
Logged
estadok
Jr. Member
**
Posts: 84



View Profile WWW Email
« Reply #5 on: April 30, 2012, 09:57:23 AM »

Hi Sukhendu,

Try SomeDate = p_web.GetValue('_date_'). I use this to prime StartDate for UpdatePlanner. So you can use this in to your procedure.
Logged

Clarion 9.0.10376
NetTalk 7.26
SecWin 6.25
StringTheory 1.92
sukhendu
Jr. Member
**
Posts: 77


View Profile Email
« Reply #6 on: April 30, 2012, 11:30:31 AM »

Thanks estadok.  This is what I have:
1) Table Daily that has a column DLY:DLYDate.
2) I load this into a NetWebYear procedure
3) I click a date on the calendar where DLY:DLYDate exists (which is visible as a darker font on the calendar). 
4) The click event in step 3 will run a new procedure (say a report) which needs that date.  I do not want to load the FORM for Daily table.

As we suggested, I can get the value using GetValue function, but first I have to store the value or pass it.  How do I store it while I'm still on the NetWebYear procedure?  I did not see any parameter passing option on the NetWebYear procedure.

- Sukhendu
Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7146



View Profile
« Reply #7 on: April 30, 2012, 08:16:56 PM »

Hi Sukhendu,

ok, you're off track mate, so let's back up a bit.

Firstly, and it's important to realise this, you are not calling your report from the NetWebYear procedure. Because by the time the user _sees_ the calendar, the procedure has finished and disappeared.

The report procedure is called by the _browser_, via the URL embedded in the calendar cell.

So the first key is not to think of embedding in the NetWebYear, because at the time of the click it simply doesn't exist, and is not called. The report is called.

Fortunately the date the user clicked is already a parameter of the url. (Although I guess to some extent that depends on what you've done setting up the calendar). But if it is there, it's passed as _date_, so in the _report_
procedure you can do a
loc:date = p_web.GetValue('_date_')
and use loc:date in your report filter as normal.
(don't forget to BIND loc:date if you use it in a filter.)

cheers
Bruce
Logged
sukhendu
Jr. Member
**
Posts: 77


View Profile Email
« Reply #8 on: May 01, 2012, 01:35:04 PM »

Thanks Bruce for clearing thing up.  It is working now if I run a FORM procedure when a date is clicked.  But if run a report instead of a form I get "No matching prototype available error" (If p_web.GetPreCall('Rpt_DailySummary') = 0 then Rpt_DailySummary(p_web,Net:Web:Popup).  So I'm accessing the report via a form.  It would be nice if I an directly run the report when a date is clicked on the NetWebYear.

Sukhendu

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search