Seal Report Forum
»
Troubleshooting
»
Bug Reports
»
Bug 33 Ghost columns in my DataTables when using IE9
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209  Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Using the 1.4 version, I have experienced the ghost (blank) extra cells in my table in the following configuration: DataTables is enabled, and IE9 is used (this is the case for the Report Viewer under Windows 2008). Actually it is a bug from IE9 and you can have the detail in https://www.datatables.net/forums/discussion/5481/bug-ghost-columns-when-generating-large-tables. The workaround I made is just to update the following JavaScript in the C:\ProgramData\Seal Repository\Views\Model.cshtml file (I just added 3 lines at the end): Code:<script type="text/javascript">
$(document).ready(function () {
var dataTables = $('#@View.ViewId .data_table');
try {
if (dataTables != null && @Helper.ToJS(View.GetBoolValue("data_tables_enabled")) && !@Helper.ToJS(Report.PrintLayout))
{
dataTables.dataTable({
"sDom": '<"dataTableTop"lfpri>t',
"aoColumnDefs": [{ "bSortable": false, "aTargets": ["firstcell"]}],
"oLanguage": {
"sProcessing": "@Report.Translate("Processing...")",
"sLengthMenu": "@Report.Translate("Show _MENU_ rows")",
"sZeroRecords": "@Report.Translate("No row")",
"sInfo": "@Report.Translate("Showing _START_ to _END_ of _TOTAL_")",
"sInfoEmpty": "@Report.Translate("Showing 0 to 0 of 0")",
"sInfoFiltered": "@Report.Translate("(filtered from _MAX_)")",
"sInfoPostFix": "",
"sSearch": "@Report.Translate("Filter:")",
"oPaginate": {
"sFirst": "|<",
"sPrevious": "<<",
"sNext": ">>",
"sLast": ">|"
}
},
"bSort": @Helper.ToJS(View.GetBoolValue("data_tables_sort_enabled")),
"aaSorting": [],
"bPaginate": @Helper.ToJS(View.GetBoolValue("data_tables_pagination_enabled")),
"sPaginationType": "full_numbers",
"iDisplayLength": @View.GetValue("data_tables_pagination_size"),
"bInfo": @Helper.ToJS(View.GetBoolValue("data_tables_show_information")),
"bFilter": @Helper.ToJS(View.GetBoolValue("data_tables_filter_enabled")),
"bProcessing": @Helper.ToJS(View.GetBoolValue("data_tables_show_processing")),
"bAutoWidth": false
});
var expr = new RegExp('>[ \t\r\n\v\f]*<', 'g');
var tbhtml = dataTables.html();
dataTables.html(tbhtml.replace(expr, '><'));
}
}
catch (e) { };
});
</script>
and it seems to work fine... Edited by user 11 years ago
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209  Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Actually the previous trick for ghost columns does not work if you a split by page values...in this case all the DataTable are the same ! The best way to fix this problem is to edit the C:\ProgramData\Seal Repository\Views\Model.cshtml file and to remove the carriage return and line feed that are between <th></th> and <td></td> when the main data table is generated. It is 3 lines (one for the header, one for the body and one for the footer) that you have to changed like this: Code:<th class='@className' style='@cell.CellCssStyle'>@Raw(cell.HTMLValue)</th>
<td class='@className' style='@cell.CellCssStyle'>@Raw(cell.HTMLValue)</td>
<td class='cell_value_total' style='@cell.CellCssStyle'>@Raw(cell.HTMLValue)</td>
I made this change for the 1.5 version... Edited by user 11 years ago
| Reason: Not specified
|
|
|
|
Seal Report Forum
»
Troubleshooting
»
Bug Reports
»
Bug 33 Ghost columns in my DataTables when using IE9
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.