Parameters for Report starting via Job Scheduler
fve
Member Posts: 28
Hi,
Our Sales-invoice Report is running a long time lately, so we would like to schedule to run our Sales Invoice Report during the night using the Job Scheduler.
Is it possible to use parameters, to run the report only for a certain period (e.g. run the report for all invoices of last week).
We would also like to schedule other reports this way.
So it would be nice to automate this with parameters for every report.
However, we don't know if this is possible.
Our Sales-invoice Report is running a long time lately, so we would like to schedule to run our Sales Invoice Report during the night using the Job Scheduler.
Is it possible to use parameters, to run the report only for a certain period (e.g. run the report for all invoices of last week).
We would also like to schedule other reports this way.
So it would be nice to automate this with parameters for every report.
However, we don't know if this is possible.
0
Comments
-
Out of the box, no.
You'll need to set implicit filters in the report to print what you need.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
The reports can be customized and some "parameter passing" method can be used to set the parameters. It is not easy, but it is not too hard. I made it... :-)0
-
Thanx for the replies.
Back to the drawing table
0 -
Scheduling the report might be a solution, but have you looked at the queries that are in the report? You might be able to speed it up.
Depending if you are running SQL or C/SIDE you can use the client monitor and/or SQL Profiler to look at the statements and database usage.
What also often can help a lot is moving to Temptables before reporting and report on the buffers.0 -
Waldo wrote:There is no way to make it 100% dynamically, because there is no way (in my knowledge) that you can pass a recordref to a REPORT.RUN - statement.
Yes, this PUSH method is not possible, but you can create support library with easy functions which you can use in the report to PULL the parameters. In this case you just needs to add few lines of code into each report you want to use in this module and you are done... :-)0 -
You can write code in report when you have report designer. And yes, it is not much enduser-frendly. But for developer it is just few minutes of work to extend some report when you have such a support library (plus testing etc. which can be much more). And yes, there is no general solution which don't require additional changes in code per report.0
-
Something like that is an easy thing for a solution center. I've done something like that to run MRP in the scheduler. What you'd have to do is add setup fields to store the parameters that the report should use, add some functionality to the report to be able to receive the parameters, create a codeunit to retrieve the parameters and set them into the report, and put the codeunit in the scheduler.0
-
What we have been investigating (and still are) is a way to expand our NAS Scheduler, to be able to dynamically schedule reports ... and pass filters. User shouldn't have to add code to any report.
It IS possible when you use a very (VERY) big CASE-statement, but that is off course not what we want
. We also want to include custom tables dynamically.
We concluded this was a no-go, and we are handling these requests now the same way as you are mentioning.
0 -
-
DenSter wrote:Should have called me Eric, I'd be able to tell you in two minutes

Me too... :-) :whistle:0 -
As an end users we do this, and you don't really need your solution center to do it for you, make a copy of the report you want to run, leaving your original intact, makes future upgrades much easier, and you can test it without missing up your original.
Then make a small modification to the new report. since we know when we want to run it, say each Saturday night in the job schedular. we know what the filter needs to be.
it needs to be the range
(today -7days) to (today), that covers the full week
so we add two variables to the report
FromDate := TODAY - 7;
ToDate := TODAY ;
then set your filter using the above dates
Record.SETFILTER(Field, String, [Value],...)
so depending on the report,
"Sales Invoice Header".SETFILTER(DateFilter,%1..%2,FromDate,ToDate)
This is definitely within your ability to do, with a little practice. I am sure it can be done a lot better by a solution center, they can make a separate NAS job scheduler for you, modify the reports, ect ect ect, and in a month or two you can have it working, or you can spend a little time right now, get it done a little less eloquently, and be a lot smarter for the effort.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions



