+ my $show_info_err = ($self->{report}->profile->get('full_preview', 0) == 1);
+ my $show_first_20 = ($self->{report}->profile->get('full_preview', 0) == 2);
+
+ my $num_rows = 0;
+ if ($show_first_20) {
+ $num_rows = min($self->{report}->numrows, 20);
+ } elsif ($show_info_err) {
+ # count each status row only once
+ $num_rows = SL::DB::Manager::CsvImportReportStatus->get_all_count(query => [csv_import_report_id => $report_id],
+ select => ['row'],
+ distinct => 1,);
+ } else {
+ # show all
+ $num_rows = $self->{report}->numrows;
+ }