Easiest way to run REPORT using NAS (4.0SP3) w/o job sched.

emulsifiedemulsified Member Posts: 139
I have read the How To's for NAS but don't understand how I modify or add entries to the CODEUNIT so that I can have NAS Server run a report every 30 minutes between the hours of 7:00am and 5:00pm every day.

I would rather a DATAPORT but it's my understanding I can't do that via NAS without Job Scheduler so I would like to just run a report (report will use ADO to write to outside mySQL DB) every 30 minutes between the hours of 7:00am and 5:00pm every day. I am using the Native DB so I can't just connect to a SQL server and do this and I'm not interested in the ODBC piece either.

Can anyone point me to very blunt examples showing similar implementations to what I am trying to do?
Half-empy or half-full how do you view your database?

Thanks.

Comments

  • GRIZZLYGRIZZLY Member Posts: 127
    If I understand your requirement correctly you want to launch some reprt via NAS service. Below you'll find my example.

    In Codeunit 1 in trigger
    NASHandler(ATASID : Text[260])
    IF GenSetupL."Run Scheduler" THEN BEGIN
       GenSetupL.TESTFIELD("Scheduler Interval (H)");
       CREATE(NTimer);
       NTimer.Interval := 1000 * 60 * 60 * GenSetupL."Scheduler Interval (H)";
       NTimer.Enabled := TRUE;
    END;
    

    Trigger
    NTimer::Timer(Milliseconds : Integer)
    MESSAGE(RunScheduler, FORMAT(TODAY), TIME);
    CalculateBonus.RUN;
    COMMIT;
    SendSMS.RUN;
    COMMIT;
    CheckSMSStatus.RUN;
    

    You should implement the logic of checking current time in the NTimer::Timer trigger.
    Hope this helps!
    Sincerely yours, GRIZZLY
    Follow my blog at http://x-dynamics.blogspot.com
  • emulsifiedemulsified Member Posts: 139
    I don't have Job Scheduler. Is that a requirement for your suggestion?
    Half-empy or half-full how do you view your database?

    Thanks.
  • GRIZZLYGRIZZLY Member Posts: 127
    Yep. If you'd have, then this task could be done by setup. In other case - it's a simple modification of 1'st CU.
    Sincerely yours, GRIZZLY
    Follow my blog at http://x-dynamics.blogspot.com
  • ara3nara3n Member Posts: 9,256
    The easiest way to ask somebody else to do it
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.