Scheduled Distribution

Created by Damien Zwillinger, Modified on Wed, 13 Nov at 4:04 PM by Harry Lewis

Applies to:

  • Velixo Classic
  • Velixo NX*
  • Acumatica, MYOB Acumatica, Cegid XRP Flex


Important: To run scheduled report distribution, you will need to use the Windows Task Scheduler with the supporting command line program for your version of Velixo:

Velixo Classic: Velixo.Reports.CommandLine.exe
Velixo NX: Velixo.NX.ReportDistribution.CommandLine.exe

and use the command line parameters listed below.




TABLE OF CONTENTS

 


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.

 

mceclip3.png

In the Actions panel, click Create Task.

 

mceclip4.png


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.

 

mceclip7.png


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


Program/script for

Velixo Classic

"%APPDATA%\Velixo\ Velixo Reports 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)

or

Program/script for Velixo NX

"%APPDATA%\Velixo\Velixo NX Report Distribution Agent\ Velixo.NX.ReportDistribution.CommandLine.exe"

 

e.g., "C:\Users\sara\AppData\Roaming\Velixo\Velixo Tools\ Velixo.NX.ReportDistribution.CommandLine.exe"

* Current, this feature is released as a "preview" (and may not yet be entirely stable) and requires that the Velixo Tools be installed.

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.

 

mceclip0.png

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:

 

mceclip9.png

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.


 


Options


Option

Required/Optional

Description

--file

Required

Path to Excel workbook to open

--distribution-list

Required

The name of distribution list to process

--log-file

Optional

Path to a log output file

--xll

Optional

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

--silent

Optional

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

false - shows error messages in dialog boxes

--visible

Optional

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

--workbook-passwordOptional

available in version 7.1.318.28338 or higher
provides the ability to run report distribution or refresh on password-protected workbooks.  

The syntax is:
--workbook-password pass
or
--workbook-password "pass"




Advanced configuration for non-logged in users (NOT RECOMMENDED)


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.

 

mceclip2.png


Note: This technique is subject to change or become invalid in future releases of Windows should Microsoft increase/change the security involved in running applications when a user is not logged in.



Troubleshooting

 

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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article