If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This topic provides step-by-step instructions for creating a basic Crystal Report that users can run from Aptify. If you already have experience using Crystal Reports, you may only need to refer to the "Highlights" section below, which provides a summary of the -recommendations and requirements for writing Crystal Reports for Aptify.

Guidelines

Aptify recommends that you follow these guidelines when creating Crystal Reports for Aptify:

  • Aptify strongly recommends that you use the base views in the entity definition database (typically, Aptify) as the source for Crystal Reports rather than the base tables.
  • Aptify reports are list-driven. When you run a report, the system first creates a List that contains the records from the specified view. The system then uses this List as the source for the Crystal Report. Therefore, to display the correct records in the report, you must add the vwListDetail base view as a data source for the report and link the -vwListDetail.RecordID field to the ID field of the report's service. Info: If you create a Crystal Report that does not include vwListDetail as a data source, then the report will display all records in the service rather than only those displayed in the selected view.
  • In general, do not define any Record Selection filters within Crystal Reports. Filtering within the report itself can result in incomplete reports that do not contain all of the records in a selected view.
  • Aptify provides many sample reports with the baseline Aptify product. You can use any of these reports as a starting point for your custom reports.
  • You can find a report's Crystal Reports (*.rpt) file in the C:\Program Files\Aptify 5.5 folder on a client computer that has recently run the report.
  • Alternatively, you can download the report file to your client computer's C:\Program Files\Aptify 5.5 folder by right-clicking the report's Object Repository Objects record in the Object Repository Administration dashboard and selecting Download Object from the pop-up menu.
  • If the entity in which the report is to be associated with has field level security enabled, the Verify on First Refresh option must be unchecked under the Crystal Report Options.

Step-by-Step Instructions

The steps below provide an overview of how to create a Crystal Report for Aptify using the version of Crystal Reports included with Visual Studio. This same process is generally applicable to other versions of Crystal Reports, but you may want to refer to the documentation that came with your version of Crystal Reports for specific instructions.
Info: The following procedure describes how to create a report that meets the minimum requirements for integrating into Aptify. It is not intended to be a substitute for the Crystal Reports user documentation provided by Business Objects.

  1. Design your report.
  • Determine what information you want the report to display.
  • Identify the service from which users will be able to run the report.
  • Identify which base views the report will need to access in order to retrieve all of the desired information.
  • Sketch a design layout for the new report.
  1. Open a new Crystal Reports project.
  • In Visual Studio, click New > Project... > Visual Basic > Crystal Reports Application and specify the project details.

Creating a New Crystal Reports -Application in VS 2008

  1. Click OK to load the project and display the Crystal Reports Gallery dialog (see Figure 15.12).
  2. Select the Using the Report Wizard option under the Create a New Crystal Report Document heading.

Crystal Reports Gallery Dialog

  1. Select a document type under the Choose an Expert heading.
  • These general instructions assume that you have selected the Standard option, as illustrated in Figure 15.12. Refer to the Crystal Reports user documentation for information on creating other report types.
  1. Click OK.
  • The Data dialog appears.
  1. Expand the Create New Connection folder.
  2. Select the ODBC (RDO) option to open the Data Source Selection dialog.
  3. Select APTIFY from the Data Source Name list and click Next.
  • This DSN is created automatically when you run a report in Aptify. Therefore, if this DSN does not already exist, run a report using the Aptify client first and then return to this screen to select the APTIFY DSN.
  • If you connect to multiple Aptify database servers in your development environment, you may want to check the APTIFY DSN to confirm it is linked to the correct server (from the Data Sources (ODBC) administrative tool).

Data Source Selection Dialog

  1. Enter a user name and password that has administrative privileges for Aptify database.
  • By default, sa appears in the User ID field.
  • Alternatively, you can place a check mark in the Trusted Connection box if your Windows user has administrative privileges for the Aptify database. However, for best results, Aptify recommends that you specify the sa user.

Database Connection Information Dialog

  1. Click Finish.
  • Aptify now appears under the ODBC (RDO) folder in the Data dialog, as shown in Figure 15.15.
  1. Expand Aptify > Aptify > dbo > Views.
  2. Locate vwListDetail from the list of Views and double-click it to add it to Selected Tables column.
  • You need to use vwListDetail in your report because reports in Aptify are list-based.
  1. Add one or more additional base views based on the design of your report. Click Next when finished.
  • Add the view for all entities that contain information that you want to display on the report.
  • For example, in Figure 15.15, the Selected Tables column also includes vwVehicles and vwRentalAgreements. You can use these views to create a Vehicles report that includes information from related Rental Agreements.

Select Base Views to Use As Data Sources

  1. Click Next to continue.
  • The Link dialog appears. This dialog lets you specify how each of the views you selected should be linked together.
  1. Click the Clear Links button and click Yes to confirm your selection.
  • Crystal Report automatically links fields that share the same name. In general, this is not a correct assumption for Aptify entities. You must clear these default links and add the links manually.
  1. Rearrange the positions of the tables within the Link dialog in an order that makes sense to you given your design requirements.
  • This is not a requirement but it can make it easier to identify the links between the various tables.
  • For example, you may want to move the vwListDetail table to the far left of the window since it is the first base view that the report will access (since the -members of the list identify the records to include in the report).
  1. Add a link between the RecordID field in vwListDetail and the ID field of the base view that corresponds to the entity for which you are creating the report. The RecordID field in a list corresponds to the ID field in the list item's service.
  • Select RecordID in the vwListDetail table. While holding down the mouse -button, drag RecordID to the ID field of another base view. Then, release the mouse button to create the link between these two fields.
  • For example, in Figure 15.16, vwListDetails.RecordID is linked to vwVehicle.ID.

Linking Base Views

  1. Link other fields as necessary based on your report's design.
  • For example, if you want to incorporate Rental Agreement information into a Vehicles report, link vwRentalAgreements.VehicleID to vwVehicles.ID.
  1. When finished, click Next to continue to the Fields selection dialog.
  2. Select the fields that you want to display in the report by double-clicking a field in the Available Fields column.
  • In Figure 15.17, five Vehicles fields and six Rental Agreements field have been moved to the Fields to Display column. Note that you can use the up and down arrows to arrange the fields in any order.

Selecting Fields

  1. Click Next to continue to the Grouping dialog. Create groupings as necessary, depending on the requirements of the report.
  • Refer to the Crystal Reports user documentation for information on grouping.
  • In the example in, Rental Agreements will be grouped by a Vehicle's ID.

Grouping Setup

  1. Click Next to continue to the Summary dialog, if you specified any groupings. Specify summary fields as necessary, depending on the requirements of the report.
    • Refer to the Crystal Reports user documentation for information on summaries.
  2. Click Next to continue to the Group Sorting dialog, if you specified any groupings. Specify the group sorting as needed, depending on the requirements of the report.
    • Refer to the Crystal Reports user documentation for information on group sorting.
  3. Click Next to continue to the Charting dialog (if applicable) to specify a chart type to add to the report.
    • Refer to the Crystal Reports user documentation for information on charting.
  4. Click Next to continue to the Record Selection dialog. Do not configure any filters for this report. A View's filters in Aptify will determine which records to include in the report.
  5. Click Next to continue to the Templates dialog. Select a template for the report.
  6. Click Finish to display the report's default layout.
  7. Modify the report layout, add calculated fields, and add a report title as necessary.
  • Refer to the Crystal Reports user documentation for more information on -customizing reports.
  • Use the Design tab to modify the report's layout and the Preview tab to monitor how design changes affect the report's appearance when data is added.

Report in Design Mode

  1. If the entity in which the report is to be associated with has field level security enabled, you must turn off the Verify on First Refresh report option. If this option is left enabled, then only system administrators will be able to load this report within Aptify.
    • From the menu bar, select Crystal Reports -> Reports -> Report Options.
    • Uncheck the Verify on First Refresh option.
  2. Save the report to your computer or to a location on your network.
  • No labels