Hi all,
Is it possible to force the use of a specific datasource when running reports in batch with JetScheduler without using the 'Datasource=' in the reports themselves?
For performance reasons I'm lucky to have a Datasource that directly connects to the SQL-database which speeds up the reports tremendously, so I want to run the batches in the nightly built reports using that datasource.
Trouble is that when the scheduled reports are beinig run, the 'standard' Datasource (that connects via Webservices) is chosen. This causes a much, much longer runtime and the reports I expect to be ready by start of the workday have not been run at all…..
Initially I thought that running a JetReport with the SQL-Datasource and subsequently close Excel in that configuration would help (and it seemed to work for a while) but today I arroved at work only to see that the reports did not run, and Scheduler is still busy and using up CPU-time……
Willem
4 comments
-
Jet Reports Historic Posts Official comment Hello Willem -
When you state "I thought that running a JetReport with the SQL-Datasource and subsequently close Excel in that configuration would help", you are mostly correct.
When the Windows Scheduler runs a Jet Essentials report, Excel will use whatever data source is currently configured as the default data source.
If you were to run your specific report with the SQL data source, but then change to a different data source before closing Excel (or if Excel is opened and the default data source change anytime prior to the running of the scheduled task), that different data source will be used.
The concept of being able to set and change a report-specific default data source is currently being explored as a future feature of Jet Essentials. -
Jet Reports Historic Posts Thanks for your answer!
I will make sure to close Excel with the required datasource active, and hope that in a future release this can be incorporated.
Willem -
Jet Reports Historic Posts +1 for this feature request!
We have multiple store branches, and each branch is being setup as a different company in NAV.
Now, I want to create a separate set of batch for each store branch, and currently this is not possible using Jet Scheduler batch file.
The only way to do this right now is to open excel, select which company, and then run the batch.
Wait for it to complete, and then open excel again, and select a different company, and then run the batch again.
Would be really nice to be able to accomplish all this without repeatedly change which company to run.
Thx
Andy -
Jet Reports Historic Posts Hello Andy,
It is definitely possible to set up the Jet Scheduler to run multiple copies of the same report for different companies.
You just need to add a "Company=" filter in your Jet functions on the source report and create a named range for that filter.
In the batch file add the named range and the value you would like to pass to it.
The same thing could be done for a "DataSource=" filter if you had multiple data sources.
I have attached a simple static batch file and sample report that could be used to run the same report for multiple customers for multiple companies.
With this one batch file you could run as many different companies as you would like.
You could split this up into multiple batch files if you want the companies to run on different days or you could create multiple batch named ranges (Company1/Company2/Company3) and create a separate Jet Scheduler task for each named range.
Best regards,
MWilson
Sample Static Batch File.xlsx
MyInputReport.xlsx