Describes how to create a report using Crystal to show a customer's purchasing history.

Uses Control's Account and Transheader tables

None

  1. Create a Blank Page in Crystal. Select the Account Table and the Transheader Table. You may use the Inner Join or the Left Join for this application although it is generally advisable to Left Join all tables.
  2. Create 3 Parameters: A Begin Date, an End Date, and a Company Parameter. The two Date parameters must be of Date type. The company parameter is of String type.
  3. Create a Variable called “Days Out” or something similar. In the formula box create the Closed Date - Sale Date formula to give you the days from invoicing to payment for each order. You will later use the Insert command and select “average” to get the average days outstanding before payment for all orders.
  4. Drag the Account Name, Transheader.TotalPrice, SaleDate, and ClosedDate fields to your report.
  5. Group the Report with Account at the highest level, Sale Date at the second level. For the Sale Date Group select Group By Year to get annual sales. Select the Option for each Group to show the Group in the Header of New Pages.
  6. In the Select Criteria enter the following code:

<code> {TransHeader.SaleDate} >= {?Begin Date} and {Account.CompanyName} like {?Company Name} and {TransHeader.ClosedDate}

You could leave a comment if you were logged in.