Questions and Answers
Q: This solution provides information on creating a datadrill to display credit information on a customer regarding average days to pay. The purpose of this datadrill is to provide information to make credit limit decisions.
A:
- Under the File menu, click Maintain Dataviews.
- Type AVG_DAYS_2PAY in the Dataview ID field.
- Click Add.
- Type the title and the description for this new dataview.
- Click the ellipse button located beside the Table field.
- Select the ARYMST table from the list.
- Click OK.
- Click the ellipse button located beside the column field.
- Add the desired fields for this report, but you must include the CUSTNO field for this datadriller.
- Select CUSTNO from the Dataview Columns list in the DataDriller – Define Columns screen.
- Click Details.
- Click Advanced.
- Click Add Expr.
- Type avg(dtepaid-invdte) in the Column or Expression for the SQL Select field:
- Type avg_days in the Column Alias field.
- Select Numeric from the Data Type list.
- Type Average Days to Pay in the Column Title field.
- Click OK to save changes.
- Type the following in the Filter field:
.T.group by custno having avg_days<>0 - Type the following in the Order by field:
avg_days desc - Click Save.
- Exit the Maintain Dataviews screen.
The avg_day_2pay dataview that you created should now be accessible from the datadriller list. When you select the avg_day_2pay dataview it will display records for the average days to pay for each customer.
© Copyright Sage Software