Find the DataThe data file structure that is available for
the report is shown below. The 1st field in each table is the key, primary, index field of the file. Now, decide which fields you will need and what data files (tables)
have the fields (columns). After the general layout has been approved, and any changes noted, check the layout for what data you need to know from the data base. Divide the required data into
what is calculated, and what must come from the files. Sometimes formulas use data that does not print on the report. Include that data in your lists. Remember everything has to breakdown by
date, too. Report Data that Come from Files: Sales Rep Name Sales Rep Region Sales Rep Sales Sales Rep Quota Sales Rep Cost of Sales (COS) Customer Name
Customer Sales Dollars Calculated Report Data: Bonus Amount % Profit Amount and % Over/Under Quota Bonus Group % and Display String If you have the same data in several files,
pick as much data from already used files as possible. After looking at your 1st list and comparing it with the tables that are available to you, you decide to use these File.FIELDs:
Sales Rep NameEmployee.NAME for Sales Rep Sales Rep RegionSalesinfo.REGION for Sales Rep Sales Rep SalesLineItem.PRICE added up for Sales Rep for sales this month
Sales Rep QuotaSalesinfo.QUOTA for Sales Rep Sales Rep COSLineItem.COS added for Sales Rep for sales this month Customer NameCustomer.CONAME for Sales Rep for sales this month Customer
Sales $Sum of LineItem.PRICE for this Sales Rep, totaled by Customer for sales this month Pick the Data Links Now that you have decided what fields and files you need data from, you must decide the best way to link them. The Groups Go back to your report layout and look at how the data is grouped.
- There is a Group by Sales RepWe calculate the bonus for one Sales Rep at a time.
- There is a Group by Date of sales by this Sales RepAll sales and costs have to be in the desired month.
- There is a Group by Customer of this Sales RepEach rep's sales $ are subtotaled for each customer. (Can different Sales Reps sell to the same customer, so one customer might be on more
than one report?)
You can tell by this analysis, that the Sales Rep is the key to the report and should probably be the top of the linkage tree.
The Links Now, look more closely at the data tables. Check the key fields
for each file. Where do these key fields appear in other data tables? When a key field occurs in another file, you can make a link to that file. Once linked to the file, you can access
all data fields in that file. We link from the Sales Rep to the Header and then the Customer file. This avoids any problems we might have, if several reps sell to the same customer. If we
had connected from the Header.SLSID to the Salesinfo.SLSID, we might have had difficulty with the sort order. |