diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 0a38a1faf1..5002863a73 100644
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -2228,21 +2228,41 @@ function reporting_historical_data($report, $content) {
 	
 	$return['keys'] = array(__('Date'), __('Data'));
 
-	$result = db_get_all_rows_sql 	(
+	$module_type = db_get_value_filter('id_tipo_modulo', 'tagente_modulo',
+			array('id_agente_modulo' => $content['id_agent_module']));
+	
+	$result = array();
+	switch ($module_type) {
+		case 3:
+		case 17:
+		case 23:
+		case 33:
+			$result = db_get_all_rows_sql 	(
+									'SELECT *
+									FROM tagente_datos_string
+									WHERE id_agente_modulo =' . $content['id_agent_module'] . '
+									 AND utimestamp >' . $date_limit . '
+									 AND utimestamp <=' . time()
+									);
+			break;
+		default:
+			$result = db_get_all_rows_sql 	(
 									'SELECT *
 									FROM tagente_datos
 									WHERE id_agente_modulo =' . $content['id_agent_module'] . '
 									 AND utimestamp >' . $date_limit . '
 									 AND utimestamp <=' . time()
 									);
-
+			break;
+	}
+	
 	$data = array();
 	foreach ($result as $row) {
 		$data[] = array(
 			__('Date') => date ($config["date_format"], $row['utimestamp']),
 			__('Data') => $row['datos']);
 	}
-	
+
 	$return["data"] = $data;
 	
 	return reporting_check_structure_content($return);
diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index e51c0b8fa6..14e1bce301 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -1238,12 +1238,19 @@ function reporting_html_event_report_agent($table, $item) {
 }
 
 function reporting_html_historical_data($table, $item) {
+	global $config;
+
 	$table1->width = '100%';
 	$table1->head = array (__('Date'), __('Data'));
-	
 	$table1->data = array ();
 	foreach ($item['data'] as $data) {
-		$row = array($data[__('Date')], $data[__('Data')]);
+		if (!is_numeric($data[__('Data')])) {
+			$row = array($data[__('Date')], $data[__('Data')]);
+		}
+		else {
+			$row = array($data[__('Date')], remove_right_zeros(number_format($data[__('Data')], $config['graph_precision'])));
+		}
+		
 		$table1->data[] = $row;
 	}