Commit 521a48e9 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: fix bug where a whole row wasn’t colored if the...

reporting: fix bug where a whole row wasn’t colored if the tableSubSectionHeader option was passed at the same time
parent 4a1c2afa
function o = writeSeriesForTable(o, fid, dates, precision) function o = writeSeriesForTable(o, fid, dates, precision, ncols)
%function o = writeSeriesForTable(o, fid, dates, precision) %function o = writeSeriesForTable(o, fid, dates, precision, ncols)
% Write Table Row % Write Table Row
% %
% INPUTS % INPUTS
...@@ -7,6 +7,7 @@ function o = writeSeriesForTable(o, fid, dates, precision) ...@@ -7,6 +7,7 @@ function o = writeSeriesForTable(o, fid, dates, precision)
% fid [int] file id % fid [int] file id
% dates [dates] dates for report_series slice % dates [dates] dates for report_series slice
% precision [float] precision with which to print the data % precision [float] precision with which to print the data
% ncols [int] total number of columns in table
% %
% %
% OUTPUTS % OUTPUTS
...@@ -69,6 +70,9 @@ if ~isempty(o.tableRowColor) ...@@ -69,6 +70,9 @@ if ~isempty(o.tableRowColor)
end end
if ~isempty(o.tableSubSectionHeader) if ~isempty(o.tableSubSectionHeader)
fprintf(fid, '%s', o.tableSubSectionHeader); fprintf(fid, '%s', o.tableSubSectionHeader);
for i=1:ncols-1
fprintf(fid, ' &');
end
fprintf(fid, '\\\\%%\n'); fprintf(fid, '\\\\%%\n');
return; return;
end end
......
...@@ -170,7 +170,7 @@ fprintf(fid, '%%\n'); ...@@ -170,7 +170,7 @@ fprintf(fid, '%%\n');
% Write Report_Table Data % Write Report_Table Data
for i=1:ne for i=1:ne
o.series{i}.writeSeriesForTable(fid, o.range, o.precision); o.series{i}.writeSeriesForTable(fid, o.range, o.precision, ncols);
if o.showHlines if o.showHlines
fprintf(fid, '\\hline\n'); fprintf(fid, '\\hline\n');
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment