Lines 63-68
runreport.pl [ -h | -m ] [ -v ] reportID [ reportID ... ]
Link Here
|
63 |
--subject=s subject for the e-mail |
63 |
--subject=s subject for the e-mail |
64 |
--param=s parameters for the report |
64 |
--param=s parameters for the report |
65 |
--store-results store the result of the report |
65 |
--store-results store the result of the report |
|
|
66 |
--separator separator character for CSV |
67 |
--quote quote character in CSV |
68 |
--no-quote no quote character in CSV |
66 |
--csv-header add column names as first line of csv output |
69 |
--csv-header add column names as first line of csv output |
67 |
|
70 |
|
68 |
|
71 |
|
Lines 129-134
Store the result of the report into the saved_reports DB table.
Link Here
|
129 |
|
132 |
|
130 |
To access the results, go on Reports > Guided reports > Saved report. |
133 |
To access the results, go on Reports > Guided reports > Saved report. |
131 |
|
134 |
|
|
|
135 |
=item B<--separator> |
136 |
|
137 |
Separator character for CSV, by default comma. |
138 |
|
139 |
=item B<--quote> |
140 |
|
141 |
Quote char in CSV, by default double quote. |
142 |
|
143 |
=item B<--no-quote> |
144 |
|
145 |
No quote char in CSV. |
146 |
|
132 |
=back |
147 |
=back |
133 |
|
148 |
|
134 |
=head1 DESCRIPTION |
149 |
=head1 DESCRIPTION |
Lines 181-186
my $subject = "";
Link Here
|
181 |
my @params = (); |
196 |
my @params = (); |
182 |
my $separator = ','; |
197 |
my $separator = ','; |
183 |
my $quote = '"'; |
198 |
my $quote = '"'; |
|
|
199 |
my $no_quote = 0; |
184 |
my $store_results = 0; |
200 |
my $store_results = 0; |
185 |
my $csv_header = 0; |
201 |
my $csv_header = 0; |
186 |
|
202 |
|
Lines 205-210
GetOptions(
Link Here
|
205 |
'password:s' => \$password, |
221 |
'password:s' => \$password, |
206 |
'method:s' => \$method, |
222 |
'method:s' => \$method, |
207 |
'store-results' => \$store_results, |
223 |
'store-results' => \$store_results, |
|
|
224 |
'separator=s' => \$separator, |
225 |
'quote=s' => \$quote, |
226 |
'no-quote' => \$no_quote, |
208 |
'csv-header' => \$csv_header, |
227 |
'csv-header' => \$csv_header, |
209 |
|
228 |
|
210 |
) or pod2usage(2); |
229 |
) or pod2usage(2); |
Lines 298-303
foreach my $report_id (@ARGV) {
Link Here
|
298 |
quote_char => $quote, |
317 |
quote_char => $quote, |
299 |
sep_char => $separator, |
318 |
sep_char => $separator, |
300 |
}); |
319 |
}); |
|
|
320 |
$csv->quote_char(undef) if $no_quote; |
301 |
|
321 |
|
302 |
if ( $csv_header ) { |
322 |
if ( $csv_header ) { |
303 |
my @fields = map { decode( 'utf8', $_ ) } @{ $sth->{NAME} }; |
323 |
my @fields = map { decode( 'utf8', $_ ) } @{ $sth->{NAME} }; |
304 |
- |
|
|