Index: DefaultJTopologyReport.java
===================================================================
--- DefaultJTopologyReport.java	(revision 2066)
+++ DefaultJTopologyReport.java	(revision 2067)
@@ -11,6 +11,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.logging.Level;
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.DefaultListSelectionModel;
 import javax.swing.ImageIcon;
@@ -30,10 +31,14 @@
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.gvsig.expressionevaluator.ExpressionBuilder;
-import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
+import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.expressionevaluator.GeometryExpressionBuilder;
 import org.gvsig.expressionevaluator.GeometryExpressionUtils;
+import org.gvsig.featureform.swing.CreateJFeatureFormException;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.feature.FeatureSelection;
+import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.geom.Geometry;
 import org.gvsig.fmap.geom.primitive.Envelope;
 import org.gvsig.tools.ToolsLocator;
@@ -43,10 +48,12 @@
 import org.gvsig.tools.i18n.I18nManager;
 import org.gvsig.tools.observer.Observable;
 import org.gvsig.tools.observer.Observer;
+import org.gvsig.tools.service.ServiceException;
 import org.gvsig.tools.swing.api.ListElement;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
 import org.gvsig.tools.swing.api.ToolsSwingManager;
 import org.gvsig.tools.swing.api.task.TaskStatusController;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager;
 import org.gvsig.tools.swing.icontheme.IconTheme;
 import org.gvsig.tools.task.TaskStatus;
 import org.gvsig.topology.lib.api.TopologyLocator;
@@ -64,6 +71,15 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.gvsig.featureform.swing.JFeaturesForm;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureQuery;
+import org.gvsig.fmap.dal.feature.FeatureReference;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.swing.DALSwingLocator;
+import org.gvsig.fmap.dal.swing.DataSwingManager;
+
 /**
  *
  * @author jjdelcerro
@@ -261,6 +277,14 @@
                 });
             }
         });
+        
+        this.btnShowFormGsOC2020.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                showErrorForm();
+            }
+        });       
+        
         this.taskStatusController = ToolsSwingLocator.getTaskStatusSwingManager().createTaskStatusController(
                 null,
                 this.lblTaskStatusTitle,
@@ -764,4 +788,51 @@
     private void restoreCurrentSelection() {
         this.tblErrors.setSelectionModel(this.selection);
     }
+    
+    
+    private void showErrorForm() {
+        int n = this.tblErrors.getSelectedRow();
+        if (n < 0) {
+            return;
+        }
+        TopologyReportLine line = this.linesModel.getLine(n);
+        DataStore store = line.getDataSet1().getStore();
+        JFeaturesForm form;
+        try {
+            FeatureStore fStore = (FeatureStore) store;
+            FeatureType fType = fStore.getDefaultFeatureType();
+            ExpressionBuilder builder = ExpressionUtils.createExpressionBuilder();
+            FeatureAttributeDescriptor[] pk = fType.getPrimaryKey();
+            
+            if (pk==null) {
+                //FIXME : Presentar mensaje al usuario. Como poner ventanas en JAVA
+                //FIXME : Permitir tratar tablas en las reglas.
+                return;
+            }
+                //FIXME : Falta gestionar cuando la clave primarias es de varios campos
+                
+            Feature feature = line.getFeature1().getFeature();
+            String filter = builder.eq(
+                    builder.variable(pk[0].getName()),
+                    builder.constant(feature.get(pk[0].getName()))
+            ).toString();
+            
+            form = this.createform(fStore);
+            FeatureQuery query = fStore.createFeatureQuery(filter, null, true);
+            form.setQuery(query);
+            form.showForm(WindowManager.MODE.WINDOW);
+        } catch (Exception ex) {
+            LOGGER.warn("Can't create form", ex);
+        } 
+    }
+
+    private JFeaturesForm createform(FeatureStore featureStore) throws CreateJFeatureFormException, ServiceException, DataException {
+        final DataSwingManager swingManager = DALSwingLocator.getSwingManager();
+        final JFeaturesForm form = swingManager.createJFeaturesForm(featureStore);
+        form.getFormset().setAllowDelete(true);
+        form.getFormset().setAllowNew(true);
+        form.setPreferredSize(new Dimension(400, 300));
+        return form;
+    }
+    
 }
