Scheduled Distribution

Modified on Wed, 13 Sep 2023 at 12:08 PM

Applies to:

  • Velixo Classic
  • Acumatica, MYOB Advanced, Cegid XRP Flex

Important: To run scheduled report distribution, you will need to use the Windows Task Scheduler with Velixo.Reports.CommandLine.exe and the command line parameters listed below.



Setting up a task in Windows Task Scheduler


First, from the Start menu, select Administrative Tools and then Task Scheduler.  


The main window of Windows Task Scheduler will be opened.



In the Actions panel, click Create Task.



In the Create Task dialog open the General tab, and enter the values for Name and Description:



On the Triggers tab click New and set up the appropriate schedule for your task.



Then click New on the Actions tab and fill in the required fields in New Action dialog:


"C:\Users\{username}\AppData\ Roaming\Velixo\ Velixo Report Pro\ Velixo.Reports.CommandLine.exe"


e.g., "C:\Users\sara\AppData\Roaming\Velixo\Velixo Reports Pro\ Velixo.Reports.CommandLine.exe"


(older versions of Velixo named the last folder: Velixo Reports Pro for Excel and Acumatica)

Add arguments (optional):

--file "C:\Path\To\Workbook-File.xlsx" --distribution-list "Distribution List Name"



Click OK and open the General tab of the Create Task dialog.  Ensure option "Run only when user is logged on" is selected.



For proper execution Velixo strongly recommends using this option.  In case you absolutely need to run the distribution regardless of whether the user is logged in or not, advanced configuration is required. Officially it is not supported by Microsoft.  See the "Advanced configuration for non-logged in users" section below for details.



Running the task

If you wish to run the scheduled task right away for testing purposes, right click on it in the list of tasks and select Run from the drop-down menu:



Note: In this example error handling is reporting errors to the command line.  No logging is performing. Excel user interface is hidden during the distribution process.


It is also always expected for a command prompt to appear during the execution of the scheduled task.  The command prompt closes immediately once the task is finished.


To set up the desirable scenario of a distribution process, you can use the corresponding options.








Path to Excel workbook to open



The name of distribution list to process



Path to a log output file



Custom path to Velixo Reports XLL file. Normally you shouldn’t specify this parameter, by default it uses Velixo’s installation path



true (default) - Runs the process silently, returning error messages to the command line

false - shows error messages in dialog boxes



true/false indicating whether or not the Excel user-interface should be visible during the process. Default is false

Advanced configuration for non-logged in users

In the Console Root select Component Services > Computers > My Computer > DCOM Config


Navigate to the Microsoft Excel Application at the right.  Right click Microsoft Excel Application and select the Properties item in the drop-down menu.  


In the Microsoft Excel Application dialog, click the Identity tab.  Select The interactive user option and click Apply to complete.





How can I tell what is going on, behind the scenes?


As you see from the parameters available with the CommandLine.exe application, the 

--log-file and --visible parameters can be used to provide insight into how your process is functioning.



My distributed file is displaying #VALUE! or #N/A for my Velixo functions.


By default, Excel does not (typically) recalculate a workbook when it is first opened.  This provides the scheduled Distibution List feature the ability to control any changes to the Velixo portion of your workbook. 


If, however, your workbook contains any of Excel's "Volatile" functions, Excel will tend to recalculate the workbook when it is opened (including during a scheduled distribution). 


Because Excel cannot stop Velixo during this process, this can result in the Distribution feature occurring before Excel has completed its recalculation. 


If it is not possible to remove the volatile function(s) from the report, you may need to add macros to your report to control the recalc/refresh/distribution process.  See How to execute custom VBA logic

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article