You can archive reports in the background in different formats in a folder while posting e.g. a sales invoice.
Steps
In D365 FSCM go to System administration > Setup > dox42 > dox42 parameters.
In the SSRS reports tab select the desired report and then the Archive setup button.
SSRS reports tab
Select the New button.
In the Template name column insert the path of the template.
Template name
Select the Printer setup button.
The Print destinations settings page opens.From the Print medium dropdown select the File server entry.
Print destination settings
In the File name text field insert the path of the storage folder and add at the end of the path, how the file should be named.
Example:C:\dox42Server\templates\TEST\SalesInvoice\Storage\Invoice <%SalesInvoiceLines.InvoiceID%>
From the File format menu select the format to which the file will be saved.
Select OK.
In the Report setup scroll to the right and set up the Archiving enabled and Archiving field name fields as follows:
If Archiving enabled is set to No, then the archiving action is inactive, skipped and not used.
If Archiving enabled is set to Yes, then the report will be unconditionally archived.
If Archiving enabled is set to Depending on the field value (metadata) then D365 FSCM will check the report data source field value specified in the field Archiving field name. For example, when only posted sales invoices should be archived (when the invoice number is not empty), the setup may look like this:
Example of Archiving enabled is set to Depending on the field value (metadata)
There is no
<% %
> required because the value is processed via D365 FSCM according to the report metadata structure and not via dox42. Strictly only one report data source field can be specified as the parameter, any other conditions or expressions are not allowed in the setup. The archiving action is only then executed when the specified data source field has a value, and it is skipped when the data source field value is empty (null value based on the field type).If Archiving enabled is set to Depending on the field value (template) then D365 FO will check the dox42 template field value specified in the field Archiving field name. Any dox42 template field from the report template can be used to set up an archiving condition. For example, when only invoices with the invoice amount greater than 100 in the company currency should be archived, the setup may look like this:
<% %>
is required because the field placeholder is processed via dox42. Strictly only one template field can be specified as the parameter, any other conditions or expressions are not allowed in the setup. The archiving action is only then executed when the specified template field has a value, and it is skipped when the field value is empty.Important
All template fields are considered as text fields in this mode, so only an empty string is treated as an empty template field value.
Set the Asynchronous archiving field to Yes if you like this archiving setup to be executed asynchronously. This feature can speed up processing for the user in some scenarios (e.g., printing on screen). Otherwise, the archive action is processed sequentially, and the report generation process is waiting for the archiving action to be executed.
Important
Asynchronous archiving is only applied when it is activated in dox42 parameters > General > Report Archive.
Select the Save button.
Result
Generated reports will now be archived to the specified path on your file server.