Cross document security issues when exporting or printing custom columns from components within Gantt Chart Hyper/Web Library

When you create custom grid columns using the Gantt Chart components from Gantt Chart Hyper Library or Web Library, you might find that the data is not exported nor printed successfully on some browsers (such as Internet Explorer® 10), as internal cross document security exceptions occur.

Actually, when the code from your custom column cell template functions accesses the document object to create output elements, it would refer to the main window document, which is usually different from the output document generated during exporting or printing, thus generating the mentioned security exceptions.

To resolve the issue you simply need to set the document variable to the actual output document at the top of the cell template function body:

var document = item.ganttChartView.ownerDocument;
[...]