Copy a Crystal Reports Template to Create a Crystal Report with an OLE DB (ADO) Connection

Note: This activity describes using Visual Studio 2005 with the Crystal Reports application; or using the Crystal Reports application. Activity steps may vary with later versions of these applications. This activity does not explain the installation, configuration or in-depth information for Microsoft Visual Studio, Crystal Reports or Microsoft SQL Server. See your network administrator for installation and configuration information.

Activity Steps

  1. Perform one of the following steps:
    1. To use Microsoft Visual Studio with the Crystal Reports application:
      1. Either double-click the Microsoft Visual Studio icon on the desktop, or select Start » All Programs » Microsoft Visual Studio 2005 » Microsoft Visual Studio 2005.

        The Visual Studio .NET 2005 application opens.

      2. Select File » Open File from the main menu.

        A new Windows Application project opens.

      3. Select the Visual C# » Window project type from the project types list.
      4. Select Crystal Reports Application from the templates list.
      5. Enter the Name.
      6. Enter the Location.
      7. Check Create directory for solution.
      8. Click OK.

        This step creates a Crystal Report project and opens the Visual Studio 2005 Form Design Screen, displaying the Crystal Reports Gallery form.

      9. Select As a Blank Report from the Crystal Reports Gallery form.
      10. Click OK.
    2. To use the Crystal Report application:
      1. If the Welcome to Crystal Reports form is opened, select the option to Open an Existing Report, select More Files, and click OK.
      2. If the Welcome to Crystal Reports form is not opened, select File » Open from the menu.
  2. Navigate to the folder defined by the ReportTemplatePath setting under the Reports group in the MineMarket Service Config program.
  3. Locate and select the Crystal Report template to copy.
  4. Click Open.

    The template opens in the Crystal Report application.

  5. If any links could not be updated:
    1. Click Links.
    2. Select the broken link.
    3. Click Change Source.
    4. Locate and select the correct file.
  6. Select File » Save As from the menu.
  7. Enter the name of the new report template.
  8. Select Database » Database Expert from the menu.

    The Database Expert form opens.

  9. Expand the Create New Connection node.
  10. Expand the OLE DB (ADO) node.

    The OLE DB (ADO) form opens.

  11. Select the Provider to be SQL Native Client.
  12. Click Next.
  13. Enter the name of the Data Source from where the data for the report is to come.
  14. Enter a valid User ID for the database server.
  15. Enter the Password for the user.
  16. Enter the name of the Database.
  17. Uncheck Integrated Security.
  18. Click Finish.

    The server displays as a node under the OLE DB (ADO) node, and the database displays as a node under the server node in the Data tab.

  19. Expand the node for the database.
  20. Expand the dbo node.
  21. Expand the Tables node.

    All MineMarket database tables display under the Tables node.

  22. Locate and select the table.
  23. Click > to move it to the Selected Tables group.
  24. Add other tables as required for the report.
  25. Click OK.
  26. Select the Links tab.
  27. Expand the form if not all tables display, and ensure that no tables are hiding behind other tables.
  28. Enter the links to relate the tables to each other.
  29. Click Auto-Arrange to rearrange the tables and links in a logical order.
  30. Click OK.

    This step closes the Database Expert form and returns control to the Report Template form.

  31. Rebuild the report to display the desired information.
  32. Select File » Save from the menu.
  33. Exit the Crystal Report application.
  34. If using the Microsoft Visual Studio application, exit it.