Enable the Company Selection tab for a custom report in Microsoft Dynamics SL or Microsoft Solomon

This article describes how to enable the company selection functionality for a custom report in a multi-company environment. With this functionality enabled, the user can print or print preview the report for any company ID.

Applies to:   Microsoft Dynamics SL 2011
Original KB number:   909146

Introduction

This article describes how to enable the Company Selection tab in the Report Options Interpreter (ROI) screen in Microsoft Dynamics SL or in Microsoft Solomon.

More information

In a multi-company environment, you may want to print reports for companies other than the company to which you are currently logged on. By default, custom reports don't include this functionality. To enable this functionality in Microsoft Dynamics SL or in Microsoft Solomon, follow these steps.

Note

  • This multi-company printing limitation also occurs when you use the Print Preview feature.
  • The following steps are specific to Crystal Reports 10 for Solomon. However, these steps apply to all versions of Crystal Reports when you use Crystal Reports together with either Microsoft Dynamics SL or Microsoft Solomon.
  1. Enable multi-company selection for the custom report. To do this, follow these steps:

    1. On the Utility menu, click Report Control Maintenance.
    2. In the Report Number box, type the report number that you want to modify, and then click Control Options.
    3. Click to select the Multi-Company Selection Allowed check box, and then click OK.
    4. Click Save, and then close the Report Control Maintenance (98.300.00) screen.
  2. Create links in your custom report to enable access to company-specific data. To do this, follow these steps:

    1. Start Crystal Reports for Solomon.
    2. In the Welcome to Crystal Report for Solomon dialog box, click Open an Existing Report, and then click OK.
    3. In the Open dialog box, select the custom report file, and then click Open.
    4. On the Database menu, click Database Expert.
    5. In the Database Expert dialog box, locate the Available Data Sources section, and then expand Current Connections.
    6. Expand the appropriate Microsoft Solomon application database, expand the second instance of this application database, and then expand Tables.
    7. Click RptCompany, and then click the Add arrow to add the RptCompany table to the Selected Tables section.
    8. Click the Links tab.
    9. Smart Linking automatically creates links between the RptCompany table and the existing tables in the CpnyID field. For example, if the Apdoc table appears in the report, Smart Linking creates a link between the APDoc.CpnyID field and the RptCompany.CpnyID field. Verify that these links are correct.
    10. If the links are incorrect, click Clear Links. Then, manually create the links. To do this, click CpnyID in the RptCompany table, and then drag the CpnyID field to the corresponding CpnyID field in an existing table.
    11. Click OK.
  3. Add the RI_ID formula to the report. To do this, follow these steps:

    1. On the Report menu, click Select Expert.

    2. In the Choose Field dialog box, click RI_ID, and then click OK.

    3. In the Select Expert dialog box, click the RptCompany.RI_ID tab, and then click formula in the list that appears.

    4. In the formula box, type the following:

      {RptCompany.RI_ID} = tonumber(RIPARAM("RI_ID"))

    5. Click OK.

    6. Click Save, and then close Crystal Reports for Solomon.