Create a Datadrill for Average Days to Pay for a Customer

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:

  1. Under the File menu, click Maintain Dataviews.
  2. Type AVG_DAYS_2PAY in the Dataview ID field.
  3. Click Add.
  4. Type the title and the description for this new dataview.
  5. Click the ellipse button located beside the Table field.
  6. Select the ARYMST table from the list.
  7. Click OK.
  8. Click the ellipse button located beside the column field.
  9. Add the desired fields for this report, but you must include the CUSTNO field for this datadriller.
  10. Select CUSTNO from the Dataview Columns list in the DataDriller – Define Columns screen.
  11. Click Details.
  12. Click Advanced.
  13. Click Add Expr.
  14. Type avg(dtepaid-invdte) in the Column or Expression for the SQL Select field:
  15. Type avg_days in the Column Alias field.
  16. Select Numeric from the Data Type list.
  17. Type Average Days to Pay in the Column Title field.
  18. Click OK to save changes.
  19. Type the following in the Filter field:
    .T.group by custno having avg_days<>0
  20. Type the following in the Order by field:
    avg_days desc
  21. Click Save.
  22. 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

Leave A Comment?