if (dr.isTemplateImportDatasets()) {
// also copy query
JRQuery query = jd.getQuery();
if (query instanceof JRDesignQuery) {
djd.setQuery((JRDesignQuery) query);
dr.setQuery(new DJQuery(query.getText(), query
.getLanguage()));
}
for (Iterator iter = jd.getDatasetsList().iterator(); iter.hasNext();) {
JRDesignDataset dataset = (JRDesignDataset) iter.next();