anchor.diff:  				//  HISTORY VIEW WINDOW CSV OR HTML 
   				//
   				//
  -				var historyViewWin = function (data, data_type) {
  -					var theItems = [];
  -					var contentData = '';
  -					if (data_type === 'text-html') {
  -
  -						contentData = data;
  -					}
  -					else if (data_type === 'text-csv') {
  -
  -						contentData = CoreUtil.csvToHTML(data);
  -					}
  -					else
  -					{
  -
  -						contentData = data;
  -					}
  +				
  +				var historyViewWin = function () {
  +					
  +					setHistoryContentData();
   
   					Ext.create('Ext.window.Window', {
   						title: 'View Report Data',
  
positive.code: 						Ext.getCmp('historyExportButton').setDisabled(true);
  					}
  				};
  
  				//
  				//  Refresh and reload the grid
  				//
  				var historyRefreshGrid = function () {
  					Ext.getCmp('historyGrid').getStore().load();
  				};
  
  
  				//
  				// viewHistory
  				//
  				var viewHistory = function () {
  
  					var selectedObj = Ext.getCmp('historyGrid').getSelection()[0];
  
  					Ext.Ajax.request({
  						url: '../api/v1/resource/reports/' + selectedObj.data.reportId + '/report',
  						method: 'GET',
  						success: function (response, opts) {
  							historyViewWin(response.responseText, selectedObj.data.reportFormat);
  						}
  					});
  				};
  
  				//
  
negative.code: 						closeAction: 'destroy',
  						modal: true,
  						maximizable: true,
  						scrollable:true,
  						layout: 'fit',
  						bodyStyle: 'padding: 10px;',
  						html: contentData,
  						dockedItems: [
  						{
  							dock: 'bottom',
  							xtype: 'toolbar',
  							items: [
  								{
  									xtype: 'button',
  									text: 'Previous',
  									id: 'previewWinTools-previousBtn',
  									iconCls: 'fa fa-arrow-left',
  									handler: function () {
  										actionPreviewNextRecord(false);
  									}
  								},
  								{
  									xtype: 'tbfill'
  								},
  								{
  									xtype: 'button',
  									text: 'Download',
  									iconCls: 'fa fa-arrow-down',
  									handler: function () {
  										historyExport();
  									}
  								},
  								{
  									xtype: 'tbfill'
  								},
  								{
  									xtype: 'button',
  									text: 'Next',
  									id: 'previewWinTools-nextBtn',
  									iconCls: 'fa fa-arrow-right',
  									iconAlign: 'right',
  									handler: function () {
  										actionPreviewNextRecord(true);
  									}
  								}
  							]
  						}]
  					}).show();
  				};
  
  