Normal Topic Run Report at Same Time Daily Automatically (Read 1455 times)
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Run Report at Same Time Daily Automatically
Oct 14th, 2009 at 12:30pm
Print Post Print Post  
I want a particular event to execute  automatically each day at 4pm (OnEntry code in a command button 'NeedToPurch').  

I can't quite get the logic, commands 'to have the code periodically (every 10 minutes) automatically check the day/time' and then kick off the report automatically when the time is between a certain time frame (If @DOW contains 1, 2, 3, 4, 5) and @time >3:50pm..<4:01pm)   then RunTheCode.

  

Larry
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Run Report at Same Time Daily Automatically
Reply #1 - Oct 14th, 2009 at 1:23pm
Print Post Print Post  
You might be better off creating a separate Sesame Application that uses XResultSetPrintReport to run this report On Application Open, then exits Sesame. Then, you can use a batch file and a Scheduled Task. This lets your operating system manage the constant checking of the time, which it's doing anyway.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: Run Report at Same Time Daily Automatically
Reply #2 - Oct 14th, 2009 at 10:41pm
Print Post Print Post  
oh, that's a cool idea.  I use batch reports and scheduled tasks for other stuff, anyway.  So that part of it will be a breeze.  

Hmmm, let's see ... the 'report' is actually a command button that cranks code in a loop and then Writeln's each loop result to the screen (which we then just click File and print out).  So basically I would set up a 2nd Sesame client on Cheryl's workstation, and the sched task would kickoff the batch file, which would start Sesame-session-2, which would run the command button code, which would Writeln the output to the screen, so she can either refer to it on screen or print it out, and then just exit that second session of Sesame manually.   Correct?

  

Larry
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Run Report at Same Time Daily Automatically
Reply #3 - Oct 14th, 2009 at 11:04pm
Print Post Print Post  
Or, you could have it write an HTML file, launch the file in your browser and go ahead and close Sesame automatically. Also allows for more formatting options and you don't lose the output if somebody accidentally closes a window prematurely.

If you use XResultSet to get the records, you won't need to mess with automating forms and suchlike.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: Run Report at Same Time Daily Automatically
Reply #4 - Oct 14th, 2009 at 11:28pm
Print Post Print Post  
Hammer,

I took your advice (mostly).  I just made a little batch file that pops up a Notepad note (using Scheduled Tasks) that reminds Cheryl to run NeedToPurch report.   Once I thought about it, that's all I want to do, is make sure she remembers to run it at a certain time (during the period that we're testing the automated calcs against our old way of doing things).

Thanks again!
  

Larry
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: Run Report at Same Time Daily Automatically
Reply #5 - Oct 14th, 2009 at 11:29pm
Print Post Print Post  
ps - I LOVE XResult
  

Larry
Back to top
IP Logged