Subject:
The steps here describe how to set up Dynamics Report Manager (DRM) to email a batch of Sales Invoices using a Launch Point.
Resolution:
Here are the steps on how to set up the Batch Report and Launch Point in DRM.
Customer Setup:
In this example, we are using a Crystal Report for the Sales Invoice report and the email is entered on the E-mail field of the Internet Information window for the Customer’s Bill to Address ID (Cards | Sales | Addresses).
Create the Report in DRM:
- Go to Reports | Dynamics Report Manager | Dynamics Report Manager Explorer.
- In the Dynamics Report Manager Explorer window, click the Reports tab, and then click the Add Report button.
- In the Add Report window, mark Enter Manually, select the Report Type of Crystal Report, and then click OK.
- In the Report Maintenance window:
- Click the Technical Name Folder button to browse to the location of your report and select it.
- Enter a Display Name for the report.
- Click the Parameters tab.
- Click the Add Parameter button.
- Click Import and then click Import again to add the parameters currently on the Crystal Report.
- Or, you can click Manual to manually add a parameter to the report.
- Click the Destination tab.
- Select File for Destination.
- To modify the name of the file, click the Output File Path and Name Builder button.
- In the Output Filename Builder window, place your cursor in front or after Report. Note: You can delete Report in the Filename or keep it.
- In the Insert Tokens section, select which Tokens you would like to add to the name of the file. After you add a Token, move your cursor in front or behind the Token to add another one.
- Click OK.
- Click the Access tab and verify the appropriate access is selected.
- Click the Connection tab and verify the appropriate settings are selected.
- Click Save.
Create the Batch Report in DRM to Email the Invoices:
- In the Dynamics Report Manager Explorer window, click the Reports tab, and then click the Add Report button.
- In the Add Report window, mark Use Wizard, and then click OK.
- In the Batch Report Wizard Welcome window:
- Click Next.
- Mark the checkbox in front of the Display Name you entered in step 4b from the Create the Report in DRM section above, and then click Next.
- Click Next.
- In the Search field, enter the name of the report’s main table, and then click the Binoculars button. In this example, it is the Sales Transaction Work table.
- Mark the Sales Transaction Work for Microsoft Dynamics GP table, and then click Next.
- Link the parameter(s) to a field in the main table. For example, @SOPType to SOP Type and @InvoiceNumber to SOP Number.
- Click Next.
- Specify the Batch Number Filter field from the Sales Transaction Entry window, and then click Next.
- Click the Link Tables button.
- In the DRM Linked Tables window, click the Add Link button.
- In the DRM Tables window, select Company for Series, enter Internet for Find and click the Binoculars button, select Internet Addresses, and then click Select.
- In the DRM Linked Tables window, select Customer Number in the Sales Transaction Work column, select Master ID in the Internet Addresses column, and then click Link.
- In the DRM Linked Tables window, select Primary Billto Address Code in the Sales Transaction Work column, select Address Code in the Internet Addresses column, and then click Link.
- In the DRM Linked Tables window, click OK.
- In the Batch Report Wizard window, select the Internet Addresses table.
- Select INet1 and click the Assign table field to To address button, and then click Next.
- Enter a Subject and Message, and then click Next.
- Enter a display name in the Batch Report Description field, and then click Next.
- Click Next.
- Click Finish.
- In the Batch Report Maintenance window, click the Data tab. Here is an example of what you will see.SELECT
ISNULL(b.INET1, ”) [INet1],
ISNULL(a.SOPNUMBE, ”) [SOP_Number],
ISNULL(a.SOPTYPE, ”) [SOP_Type]
FROM TWO..SOP10100 a
LEFT OUTER JOIN TWO..SY01200 b
ON (a.CUSTNMBR = b.Master_ID) and (a.PRBTADCD = b.ADRSCODE)
WHERE ISNULL(‘%PARAM1%’, ”) = a.BACHNUMB
*Note: TWO should be replaced with your specific Company ID.
- Click Save.
Create the Launch Point in DRM to Email the Invoices from the Sales Batch Entry window:
- In the Dynamics Report Manager Explorer window, click the Launch Points tab, and then click the Add Launch Point button.
- In the Add Launch Point window, mark Enter Manually, select Window Field or Button for Launch Point Type, and then click OK.
- In the Launch Point Maintenance window:
- Enter a Name for the Launch Point.
- Click the Settings tab and select the following:
- Trigger Type: Window Print Menu
- Attach Type: Before and After original script
- Product: Microsoft Dynamics GP
- Series: Sales
- Form: Sales Batch Entry
- Window: Sales Batch Entry
- Click the Reports tab.
- Click the + button to add the Batch Report you created in Step 3r from the Create the Batch Report in DRM to Email the Invoices section above .
- Click the Access tab and verify the appropriate access is selected.
- Click the Actions tab.
- Click the Add Custom Actions button.
- In the Custom Actions column, select Set Parameter to Field.
- In the Action Settings section, select the following:
- Report: Select the report in the list.
- Parameter: Batch Number
- Product: Microsoft Dynamics GP
- Series: Sales
- Form: Sales Batch Entry
- Window: Sales Batch Entry
- Field: Batch Number.
- Click OK.
- Click the Add Custom Actions button.
- In the Custom Actions column, select Insert Before/After Breakpoint.
- Click OK.
- Click the Add Custom Actions button.
- In the Custom Actions column, select Run Field Script.
- In the Action Settings section, select the following:
- Product: Microsoft Dynamics GP
- Series: Sales
- Form: Sales Document Print Options
- Window: Sales Document Print Options
- Field: Cancel Button.
- Click OK.
- Click the Add Custom Actions button.
- In the Custom Actions column, select Launch Specific Report.
- In the Action Settings section, select the following:
- Report: Select the report in the list.
- Click OK.
- Click Save.