Sometimes, when validating a report (like in my case for a sales invoice report), you might see the following validation error:
Report validation errors:
Template (ID: SalesInvoice.Report) validation errors:
- Template file (SalesInvoice.Report.docx) metadata is linked to a different DSP class (DocSalesInvoiceReportDSP) than the report (DocDataSourceProviderSrsReporting).
It happens when the template file is linked to the wrong DSP (Data Source Provider) class, which can cause the data to not bind properly. It’s important to check for this mismatch before continuing. However, if you’re sure the data structure hasn’t changed, you may be able to ignore this message.
These mismatches often happen when setting up or editing templates, but they’re easy to fix. Here’s how you can resolve the issue:
Step 1: Check Which DSP Class Is Used in the Template
- Download your template from the Docentric report table for the specific report (e.g., SalesInvoice.Report.docx).
- Open the template and hover over the Info icon to see which DSP class is used.
Step 2: Check Which DSP Class Is Used in the Report Setup
Now, check which DSP class is used as the data source for the report. It will likely be different from the one used in the template.
Step 3: Resolve the Mismatch
- If the DSP class in the template is correct:
Simply update the report setup to match the DSP class in the template. This will resolve the mismatch.
2. If the DSP class in the report setup is correct:
This is a bit more complex. You’ll need to generate a new DDSP file with the correct DSP class and load it into the template. Follow these steps:
- Generate a new DDSP based on the current DSP class.
- Download the template(s) from D365FO.
- Open the template and load the new DDSP file into it (using the “Load data source” button).
- Save the updated template(s) and upload them back into D365FO.
After completing these steps, the mismatch issue should be resolved, and your template and report setup will be correctly aligned, preventing any further validation mismatch errors.