Customer Vendor Relationship via Groups¶
This report shows the relationship between the vendors and the customers in the system. Each page displays a customer at the top, with the vendors that sold a product to this customer listed underneath. Because this report uses the orderdetail table to collect vendor information, it won't list customers that do not have orders in the system. To get a full overview of all customers, including those without orders, use the Customer Vendor Relationship via SubReport report. The collection of data via groups is significantly faster than the sub-report version. Note that the sub-report version produces more pages with customer/vendor relationship information than this report (based on the current order entry data for DataFlex 2019/19.1).
The ordering of the customers and vendors can be controlled via a function in the report. The functions stored in the report use one of the columns in the customer or vendor table. Any column that can be used for sorting can be utilized in these functions, but ensure that a column with unique values is chosen; otherwise, the report may not display all information correctly. For example, replacing the {vendor.name} database column with {vendor.state} results in fewer vendors shown per customer. The total sales value will remain the same, but individual line totals will be incorrect as the report should display the vendor state instead of the vendor name.
The report demonstrates the use of alternate row coloring in the list of vendors. While this is often controlled using the Mod() function on the Record Number special field, it now uses a global variable that gets reset per customer.
The report is used in the CustomerVendorRelationshipReport.rv component.