Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/report/LayoutReportActionImpl.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/report/LayoutReportActionImpl.java	(revision 1614)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/report/LayoutReportActionImpl.java	(revision 1615)
@@ -1,5 +1,6 @@
 package org.gvsig.app.project.documents.layout.report;
 
+import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.event.ActionEvent;
 import java.awt.geom.Point2D;
@@ -58,6 +59,8 @@
 import org.gvsig.pdf.swing.api.PDFSwingLocator;
 import org.gvsig.pdf.swing.api.PDFSwingManager;
 import org.gvsig.pdf.swing.api.PDFViewer;
+import org.gvsig.symbology.SymbologyLocator;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text.ISimpleTextSymbol;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dispose.DisposeUtils;
 import org.gvsig.tools.exception.BaseException;
@@ -278,6 +281,7 @@
 
         File pdfFile = null;
         Object previous_report = document.getProperty("$REPORT");
+        I18nManager i18n = ToolsLocator.getI18nManager();
         try {
             document.setProperty("$REPORT", this);
             /*
@@ -308,7 +312,6 @@
                 mapContext = mapContextCandidate;
             };
 
-            FeatureStore storeInLayout = this.store;
             if (mapContext != null) {
                 mapContext.setPrintGraphicsLayer(this.parameters.isHighlightRecord());
                 ICoordTrans ct = null;
@@ -317,7 +320,6 @@
                         FeatureStore layerStore = ((FLyrVect) layer).getFeatureStore();
                         if (layerStore != null) {
                             if (layerStore.getParameters().isTheSameStore(this.store.getParameters())) {
-                                storeInLayout = layerStore;
                                 ct = ((FLyrVect) layer).getCoordTrans();
                                 break;
                             }
@@ -356,9 +358,26 @@
                             //Do nothing, is the default behavior
                         }
                         if(this.parameters.isApplySymbolToEverythingExceptRecord()){
-                            geom = mapContext.getViewPort().getAdjustedEnvelope().getGeometry().difference(geom);
+                            Geometry viewPortGeom = mapContext.getViewPort().getAdjustedEnvelope().getGeometry();
+                            if(geom.isValid()) {
+                                geom = viewPortGeom.difference(geom);
+                            } else {
+                                Geometry geom2 = geom.fix();
+                                if(geom2 != null){
+                                    geom = viewPortGeom.difference(geom2);
+                                } else {
+                                    geom = viewPortGeom;
+                                    ISimpleTextSymbol textSymbol = SymbologyLocator.getSymbologyManager().createSimpleTextSymbol();
+                                    textSymbol.setTextColor(Color.RED.darker());
+                                    textSymbol.setHaloColor(Color.WHITE);
+                                    textSymbol.setDrawWithHalo(true);
+                                    
+                                    int idPointSymbol = graphicsLayer.addSymbol(textSymbol);
+                                    graphicsLayer.addGraphic("LayourReport", geom.centroid(), idPointSymbol, i18n.getTranslation("_Invalid_geometry"));
+                                }
+                            }
                         }
-                        graphicsLayer.addGraphic("", geom, idSymbol);
+                        graphicsLayer.addGraphic("LayourReport", geom, idSymbol);
                     }
                 }
             }
@@ -368,6 +387,10 @@
 
             pdfFile = ToolsLocator.getFoldersManager().getUniqueTemporaryFile("report.pdf");
             layout.layoutToPDF(pdfFile);
+        } catch (Throwable th) {
+            LOGGER.warn("Can't print report.", th);
+            this.getStatus().message(i18n.getTranslation("_Cant_print_report")+"\n\n"+th.getMessage());
+            throw th;
         } finally {
             document.setProperty("$REPORT", previous_report);
         }
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text.properties
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text.properties	(revision 1614)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text.properties	(revision 1615)
@@ -88,4 +88,6 @@
 _Select_symbol=Seleccionar s\u00edmbolo
 _to_record=al registro
 _to_everything_except_record=a todo excepto al registro
-_Apply_symbol=Aplicar s\u00edmbolo
\ No newline at end of file
+_Apply_symbol=Aplicar s\u00edmbolo
+_Invalid_geometry=Geometr\u00eda no v\u00e1lida
+_Cant_print_report=No se ha podido imprimir el informe
\ No newline at end of file
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties	(revision 1614)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties	(revision 1615)
@@ -88,4 +88,6 @@
 _Select_symbol=Select symbol
 _to_record=to record
 _to_everything_except_record=to everything except record
-_Apply_symbol=Apply symbol
\ No newline at end of file
+_Apply_symbol=Apply symbol
+_Invalid_geometry=Invalid geometry
+_Cant_print_report=Can't print report
\ No newline at end of file
