Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script Weekly Sales Report 1

Status
Not open for further replies.

ChadPOS

Technical User
Apr 20, 2009
4
0
0
Anybody know how to script a weekly sales report in Alohoa version 6.0.9. I am successfully scripting my daily sales report with the following line:

%IBERDIR%\BIN\RPT.EXE /DATE DATA /XH /LOAD "Default.sls.set"

This works like a champ. When I try to run the weekly report it appears to run fine, but it only shows me one day on the report. I can't figure out how to modify the date string so that it takes a range.

My goal is to run a report on Sunday night that runs the weekly sales report for the current week. Any ideas?
 
Use %1 for the "DATE" and following the report switch add the "DAYS" switch with number of days you wish to report.
%IBERDIR%\BIN\RPT.EXE /DATE %1 /RC /DAYS 7
/LOAD "DEFAULT.SLS.SET"

As best as I remember you want to use a negetive number of days if running from a WINHOOK.

I would think the best report to generate would be the weekly sales report... "CW
 
There are many ways. You can use the Windows AT schedule to fire this off, or add it to winhook and use a command line tool from Radiant called DAYWEEK

A sample of using DAYWEEK in the winnhok.bat:

del /q %IBERDIR%\tmp\*.day
dayweek

if exist %IBERDIR%\tmp\SUN.DAY (
%IBERDIR%\BIN\RPT.EXE /DATE DATA /XH /LOAD "Default.sls.set"
)



Or, if you want to use the windows task scheduler:

at 2:30 /every:SU %IBERDIR%\BIN\RPT.EXE /DATE DATA /XH /LOAD "Default.sls.set"

---
MegabyteCoffee.com
 
Awesome guys. It is working perfectly now. Thanks a ton.
 
Ok, I know this issue is closed, but I thought if someone didn't have the DAYWEEK program, that they could still use something similar in the winhook.bat (Or any batch file) if you wanted to call something only on a specific day.

The example below uses Sunday as the trigger:

Code:
date /t |find /i "Sun"
if not errorlevel 1 (
     %IBERDIR%\BIN\RPT.EXE /DATE DATA /XH /LOAD "Default.sls.set"
     )

---
MegabyteCoffee.com
 
Nice Mega.
I usually use scheduler(s) for anything Aloha.
I dislike the issues at end of day if the winhook fails for some reason. Would rather keep EOD / Grind issues separate to themselves...
 
Sorry if this is a silly question, but I am new to scipting things in Aloha. What is winhook? So far I have written Windows batch files and used the Windows scheduler to run them.

On a side note there are two other reports I would like to automate. I need an end of month sales report and a biweekly labor report. Do you guys have any ideas?

Thanks again for your help so far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top