Skip to content

Commit

Permalink
Update invoke_report_execution.py
Browse files Browse the repository at this point in the history
quick fix for issue dell#234
  • Loading branch information
MaOb74 authored Feb 7, 2023
1 parent 748a512 commit 6d0be08
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Python/invoke_report_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,15 @@ def format_output_report(self, headers):
headers=headers,
verify=False)
if report_details_resp.status_code == 200:
report_details_info = report_details_resp.json()
column_info_arr = report_details_info['ColumnNames']

column_names = [x['Name'] for x in column_info_arr]
# get the column names
report_results_url = self.base_url + 'ReportService/ReportDefs(%s)/ReportResults' % self.report_id
report_results_resp = requests.get(report_results_url,
headers=headers,
verify=False)
column_names = []
if report_results_resp.status_code == 200:
for col_data in report_results_resp.json()['ResultRowColumns']:
column_names.append(col_data['Name'])
if self.output_file is None:
print(",".join(column_names))
result_url = report_details_url + "/ReportResults/ResultRows"
Expand Down

0 comments on commit 6d0be08

Please sign in to comment.