Designing a Report Scheduler with NAS...

Hello to all in the “Brainy Bunch”: A lot of members have been asking information on NAS, PDF, e-mail etc. and a lot of senior members have taken their valuable time to guide us…However, inspite of searching the forums several times, I can’t seem to find any information on what I am trying to do: Designing a Report Scheduler using NAS. Requirements: A user of the system should be able to run a Wizard like form to specify the Report Number (look-up in OBJECTS table), specify an e-mail address (SMTP or CDO solution) and submit a date to run. The NAS will then run this report on the requested date and time, create a PDF (Amyuni Soln.) and then e-mail (with PDF attachment) to the user. Getting the NAS, PDF, E-mail to work is not a big deal, solution for each can be found on this very site, thanks to our contributing members. I am facing following problems: 1) How can I capture the Filter(s) and/or Options at the time of running the Wizard? Is it possible to display the normal Request Form to specify Filter(s) / Options ONLY? And then a) STOP the execution of the Report? b) Store this information for later use with NAS. After all, what good is a Report Scheduler if you cannot specify filters? 2) If use of Request Form is not possible, can a Form be designed to capture the information for Dataitems and corresponding filters? Using RecRef is a problem, because you need a filtered Rec to pass to the REPORT.RUNMODAL (Number,…,Rec) and I can’t figure out a way to obtain a Rec, without declaring every single table in the system as a Rec Variable and then trying to match the Dataitems for each Report, sounds completely crazy… 3) I don’t want to modify every single Report with some ‘SET’ function, to try to capture the filter information at the ‘pseudo runtime’ that is, at the time of running the Wizard. Can a SingleInstance codeunit be used for this purpose, I know with Forms it is possible. 4) Finally, I know there are some commercial solutions out there (ExpandIT, IFocus (?)…), what are they doing to address this? Are they using some API like C/FRONT, if so, can somebody please provide some sample code, is the Report functionality exposed thru C/FRONT API? Lot of questions…but a lot of knowledgeable members to look up to as well, Any ideas (David, Fritz B., Eric…?) With Regards, Sean De.

Hi, We have made a similair thing, but for generating word documents, using templates. You can store the filters in a view using rec.getview and rec.setview. For our solution we can work with record refs, but in your case it is more difficult because you need to call a report with a record. I cannot think of a solution for this quickly but I am very interesting if you or anyone else find this.

The features you try to implement are not as easy as it seems. My first advise would be read the C/Front Manual so you will be aware of all the limitations. Here are some answers to your questions : o Looking up the Object table is possible via C/Front 1/ Request Form is not exposed via C/Front so you will not be able to set options (ie: boolean flags) via C/Front 2/ Yes, this is tricky. I do not have a solution for that 3/ Again very tricky, all reports use different records, you can call all reports with one line of code but you wont be able to apply filters without a bunch of (generated?) code 4/ ExpandIT and I also believe Ifocus do no not solve the problems you’re trying to solve (ie: they do not set filter via their scheduler) Their tools are only good when the filters are already applied within Navision before being executed … A report scheduler using NAS which can pass filters is a full blown commercial product. There are certainly tricks & work around you could find to implement all your features but this iquite a task. Good luck. Keep us posted with your progress on that…