You can use the woocommerce_reports_get_order_report_data_args
filter to change the query. The following code should only show reports for completed orders for the 'sales by date' and 'sales by product' reports:
add_filter('woocommerce_reports_get_order_report_data_args', 'only_show_report_for_completed_orders');
function only_show_report_for_completed_orders( $args ) {
// When accessing the default sales by date report
if ( !isset( $_GET['tab'] ) || ( !isset( $_GET['report'] ) && isset( $_GET['tab'] ) && $_GET['tab'] == 'orders' ) ) {
$args['order_status'] = array( 'completed' );
// When accessing the specific reports
} elseif ( isset( $_GET['report'] ) && in_array( $_GET['report'], array( 'sales_by_date', 'sales_by_product' ) ) ) {
$args['order_status'] = array( 'completed' );
}
return $args;
}
This code snippet should be added to the functions.php of your child theme or via a plugin like Code Snippets.