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: 						closeAction: 'destroy',
  						modal: true,
  						maximizable: true,
  						layout: 'fit',
  						items: theItems,
  						html: contentData,
  						bodyStyle: 'padding: 10px;',
  						scrollable: true
  					}).show();
  				};
  
  
negative.code: 						Ext.getCmp('historyExportButton').setDisabled(true);
  					}
  				};
                  
  				//
  				//  Record Preview methods
  				//
  				var contentData ='';
  				var setHistoryContentData = 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) {
  							var reportData = response.responseText;
  							var reportFormat = selectedObj.data.reportFormat;
  							if (reportFormat === 'text-html') {
  								contentData = reportData;
  							}
  							else if (reportFormat === 'text-csv') {
  								contentData = CoreUtil.csvToHTML(reportData);
  							}
  							else{
  								contentData = reportData;
  							}
  		                    Ext.getCmp('viewHistoryData').update(contentData);
  						}
  					});
  				};
  				
  				var actionPreviewNextRecord = function (next) {
  					if (next) {
  						Ext.getCmp('historyGrid').getSelectionModel().selectNext();
  					} else {
  						Ext.getCmp('historyGrid').getSelectionModel().selectPrevious();
  					}
  
  					setHistoryContentData();
  					checkPreviewButtons();
  				};
  				
  				var checkPreviewButtons = function () {
  					if (Ext.getCmp('historyGrid').getSelectionModel().hasPrevious()) {
  						Ext.getCmp('previewWinTools-previousBtn').setDisabled(false);
  					} else {
  						Ext.getCmp('previewWinTools-previousBtn').setDisabled(true);
  					}
  
  					if (Ext.getCmp('historyGrid').getSelectionModel().hasNext()) {
  						Ext.getCmp('previewWinTools-nextBtn').setDisabled(false);
  					} else {
  						Ext.getCmp('previewWinTools-nextBtn').setDisabled(true);
  					}
  				};
  
  				//
  				//  Refresh and reload the grid
  				//
  				var historyRefreshGrid = function () {
  					Ext.getCmp('historyGrid').getStore().load();
  				};
  
  
  				//
  				// viewHistory
  				//
  				var viewHistory = function () {
  
  					historyViewWin();
  				};
  
  				//
  