How to assign Dynamic Names for Reports downloaded as PDF using Report to PDF solution?

Generally, Report to PDF allows to convert any CRM reports to PDF files with the name that is provided in the “File Name” field. But, in order to change the name dynamically with that of field value provided for the CRM entities, MTC has done some customization on Report to PDF solution for Microsoft Dynamics 365/CRM.

For assigning and reflecting the field value of an entity on the downloaded PDF file dynamically, you are required to follow the below steps. Please note we have used MS CRM 2011 screenshots for representation purpose in this blog. The below steps holds good for Dynamics 365/CRM too.

Step 1


   Navigate to Settings > Customization

Step 2

            Go to Report to PDF Setting and click on Fields.

            Create a new field with name as new_fieldname and Schema Name as new_Fieldname

Step 3

             Go to Form and add the newly created field

Step 4

            From Web Resources window, open the javascript file “EPDF/mtc_jsonjs” and upload the javascript file provided by MTC team. But, before adding the javascript file provided by MTC, it is highly recommended that you take a backup of your existing javascript file to avoid unnecesssary issues.

Step 5

           Go to Advance Find and select Report to PDF.

Step 6

           Open any of the previously configured entity. For example, account entity here.

Step 7

            Enter Schema Name in Field Name as shown in the below image

Note: Take Schema Name as String Field only.

Step 8

            Go to Sales > Accounts. Select any record and perform Report to PDF functionality.

Step 9

            Click Open PDF button

Step 10

            You will notice that the field value is assigned to the PDF file dynamically irrespective of what field name is given in the above image. In case where the field value is not given, the above field name will be assigned to the PDF file.

This customization also works on Attach to Notes, Attach to Email and Save as Excel.

For requesting the JavaScript to be added in the Web Resources, please contact MTC at