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/LayoutReportAction.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/LayoutReportAction.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/report/LayoutReportAction.java	(revision 1608)
@@ -6,6 +6,7 @@
 package org.gvsig.app.project.documents.layout.report;
 
 import org.gvsig.fmap.dal.swing.report.ReportAction;
+import org.gvsig.tools.resourcesstorage.ResourcesStorage;
 
 /**
  *
@@ -13,45 +14,10 @@
  */
 public interface LayoutReportAction extends ReportAction {
 
-    String LAYOUT_REPORT_BUFFER_SIZE = "bufferSize";
-    String LAYOUT_REPORT_CENTER_TO_CURRENT_ROW = "centerToCurrentRow";
-    String LAYOUT_REPORT_DEFAULT_TEMPLATE_NAME = "layout";
-    String LAYOUT_REPORT_LABEL = "label";
-    String LAYOUT_REPORT_NAME = "name";
-    String LAYOUT_REPORT_TEMPLATE_NAME = "templateName";
-    String LAYOUT_REPORT_HIGHLIGHT_RECORD = "highlightRecord";
-    String LAYOUT_REPORT_HIGHLIGHT_SYMBOL = "highlightSymbol";
-//    String LAYOUT_REPORT_LINE_COLOR = "lineColor";
-//    String LAYOUT_REPORT_FILL_COLOR = "fillColor";
-    String LAYOUT_REPORT_TYPE = "type";
-    String LAYOUT_REPORT_VIEW_TAG = "viewTag";
-    String LAYOUT_REPORT_USE_INTERNAL_PDF_VIEWER = "useInternalPdfViewer";
-    String LAYOUT_REPORT_ZOOM_TO_CURRENT_ROW = "zoomToCurrentRow";
-
     String evaluateDynamicText(String s);
-
-    double getBufferSize();
-
-    boolean isCenterToCurrentRow();
-
-    boolean isZoomToCurrentRow();
     
-    boolean isUseInternalPdfViewer();
+    public LayoutReportActionParameters getParameters();
 
-    void setBufferSize(double bufferSize);
-
-    void setCenterToCurrentRow(boolean centerToCurrentRow);
-
-    public String getViewTag();
-
-    public void setViewTag(String viewTag);
+    public ResourcesStorage.Resource getTemplateAsResource();
     
-    void setUseInternalPdfViewer(boolean useInternalPdfViewer);
-
-    void setZoomToCurrentRow(boolean zoomToCurrentRow);
-    
-    public boolean isHighlightRecord();
-   
-    public void setHighlightRecord(boolean b);
-    
 }
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 1607)
+++ 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 1608)
@@ -1,31 +1,23 @@
 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;
-import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.json.JsonNumber;
 import javax.json.JsonObject;
 import javax.swing.JComponent;
 import javax.swing.JOptionPane;
 import javax.swing.SwingUtilities;
-import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.binary.Hex;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.cresques.cts.ICoordTrans;
 import org.gvsig.andami.ui.mdiManager.IWindow;
 import org.gvsig.app.ApplicationLocator;
 import org.gvsig.app.ApplicationManager;
-import org.gvsig.app.gui.styling.SymbolSelector;
 import org.gvsig.app.project.documents.Document;
 import org.gvsig.app.project.documents.layout.LayoutContext;
 import org.gvsig.app.project.documents.layout.fframes.FFrameView;
@@ -34,7 +26,6 @@
 import static org.gvsig.app.project.documents.layout.report.LayoutReportActionFactory.LAYOUT_REPORT_ACTION_NAME;
 import org.gvsig.app.project.documents.view.ViewDocument;
 import org.gvsig.app.project.documents.view.gui.IView;
-import org.gvsig.app.project.documents.view.legend.gui.ISymbolSelector;
 import org.gvsig.desktopopen.DesktopOpen;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorManager;
@@ -44,7 +35,6 @@
 import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable;
 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.FeatureSelection;
 import org.gvsig.fmap.dal.feature.FeatureSet;
@@ -58,20 +48,16 @@
 import org.gvsig.fmap.geom.exception.CreateEnvelopeException;
 import org.gvsig.fmap.geom.primitive.Envelope;
 import org.gvsig.fmap.mapcontext.MapContext;
-import org.gvsig.fmap.mapcontext.MapContextLocator;
 import org.gvsig.fmap.mapcontext.ViewPort;
 import org.gvsig.fmap.mapcontext.layers.FLayer;
 import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
 import org.gvsig.fmap.mapcontext.layers.vectorial.GraphicLayer;
-import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
-import org.gvsig.json.Json;
 import org.gvsig.pdf.lib.api.PDFDocument;
 import org.gvsig.pdf.lib.api.PDFLocator;
 import org.gvsig.pdf.lib.api.PDFManager;
 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.fmap.mapcontext.rendering.symbol.fill.IFillSymbol;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dispose.DisposeUtils;
 import org.gvsig.tools.exception.BaseException;
@@ -123,52 +109,29 @@
     }
     
     
-    private final JsonObject json;
     private final FeatureStore store;
     private FeatureQuery query;
     private FeatureSet selection;
     private Feature current_row;
     private MutableSymbolTable symbolTable;
     private FeatureSymbolTable fSymbolTable;
-    private boolean centerToCurrentRow;
-    private boolean zoomToCurrentRow;
-    private double bufferSize;
-    private boolean useInternalPdfViewer;
     private Iterable<Feature> set;
     private int featuresCount;
-    private String viewTag;
-    private boolean highlightRecord;
-    private ISymbol highlightSymbol;
-//    private Color fillColor;
-//    private Color lineColor;
+    private LayoutReportActionParameters parameters;
     
     @SuppressWarnings("OverridableMethodCallInConstructor")
     private LayoutReportActionImpl(ReportActionFactory factory, FeatureStore store, JsonObject json) {
         super(factory, null);
-        this.json = json;
         this.store = store;
         this.selection = null;
         this.query = null;
         this.current_row = null;
         
-        this.setReportName(this.json.getString(LAYOUT_REPORT_NAME, store.getName()));
-        this.setReportLabel(this.json.getString(LAYOUT_REPORT_LABEL, this.getReportName()));
-        this.highlightRecord = this.json.getBoolean(LAYOUT_REPORT_HIGHLIGHT_RECORD, true);
-        this.highlightSymbol = createSymbol(this.json.getString(LAYOUT_REPORT_HIGHLIGHT_SYMBOL, null));
-//        this.fillColor = new Color(this.json.getInt(LAYOUT_REPORT_FILL_COLOR, Color.WHITE.getRGB()&(0x2F<<24)));
-//        this.lineColor = new Color(this.json.getInt(LAYOUT_REPORT_LINE_COLOR, Color.WHITE.getRGB()));
-        this.setCenterToCurrentRow(this.json.getBoolean(LAYOUT_REPORT_CENTER_TO_CURRENT_ROW, true));
-        this.setZoomToCurrentRow(this.json.getBoolean(LAYOUT_REPORT_ZOOM_TO_CURRENT_ROW, true));
-        this.setBufferSize(0.0);
-        if(this.json.containsKey(LAYOUT_REPORT_BUFFER_SIZE)){
-            JsonNumber theSize = this.json.getJsonNumber(LAYOUT_REPORT_BUFFER_SIZE);
-            if(theSize != null){
-                this.setBufferSize(theSize.doubleValue());
-            }
-        } 
-        this.setViewTag(this.json.getString(LAYOUT_REPORT_VIEW_TAG, null));
-        this.setUseInternalPdfViewer(this.json.getBoolean(LAYOUT_REPORT_USE_INTERNAL_PDF_VIEWER, true));
+        this.parameters = LayoutReportActionParameters.create();
+        this.parameters.fromJson(json);
         
+        this.setReportName(this.parameters.getIdentifier());
+        this.setReportLabel(this.parameters.getLabel());
     }
     
     @SuppressWarnings("OverridableMethodCallInConstructor")
@@ -177,11 +140,7 @@
         this(
                 factory, 
                 store, 
-                Json.createObjectBuilder()
-                .add(LAYOUT_REPORT_NAME, store.getName())
-                .add(LAYOUT_REPORT_TYPE, LAYOUT_REPORT_ACTION_NAME)
-                .add(LAYOUT_REPORT_LABEL, store.getName())
-                .build()
+                LayoutReportActionParameters.create(store.getName()).toJson()
         );
         try {
             this.selection = store.createFeatureSelection();
@@ -279,7 +238,7 @@
                         PDFManager pdfManager = PDFLocator.getPDFManager();
                         pdfManager.merge(singlePdfFiles, pdfFile, title, creator, subject, theStatus);
 
-                        if (this.isUseInternalPdfViewer()) {
+                        if (this.parameters.isUseInternalPdfViewer()) {
                             this.showEmbedded(pdfFile);
                         } else {
                             this.showExternal(pdfFile);
@@ -307,7 +266,7 @@
     
     private File printReport(Feature feature, int page) throws Exception {
         this.current_row = feature;
-        final LayoutPanel layout = this.loadTemplate();
+        final LayoutPanel layout = this.getTemplateAsLayout();
         final LayoutContext context = layout.getLayoutContext();
         final Document document = layout.getDocument();
 
@@ -338,8 +297,8 @@
                     }
                     String frameTag = frame.getTag();
                     String countTag = "#" + count;
-                    if (StringUtils.equalsIgnoreCase(this.getViewTag(), frameTag)
-                            || StringUtils.equalsIgnoreCase(this.getViewTag(), countTag)) {
+                    if (StringUtils.equalsIgnoreCase(this.parameters.getViewTag(), frameTag)
+                            || StringUtils.equalsIgnoreCase(this.parameters.getViewTag(), countTag)) {
                         mapContext = ((FFrameView) frame).getMapContext();
                         break;
                     }
@@ -351,7 +310,7 @@
 
             FeatureStore storeInLayout = this.store;
             if (mapContext != null) {
-                mapContext.setPrintGraphicsLayer(this.isHighlightRecord());
+                mapContext.setPrintGraphicsLayer(this.parameters.isHighlightRecord());
                 ICoordTrans ct = null;
                 for (FLayer layer : mapContext.getLayers().getLayers(null)) {
                     if (layer instanceof FLyrVect) {
@@ -374,27 +333,31 @@
                         ct = geom.getProjection().getCT(mapContext.getProjection());
                         geom.reProject(ct);
                     }
-                    if (isZoomToCurrentRow()) {
+                    if (this.parameters.isZoomToCurrentRow()) {
 
                         Envelope envelope = geom
-                                .getEnvelope().getGeometry().buffer(getBufferSize()).getEnvelope();
+                                .getEnvelope().getGeometry().buffer(this.parameters.getBufferSize()).getEnvelope();
                         mapContext.getViewPort().setEnvelope(envelope);
 
-                    } else if (isCenterToCurrentRow()) {
+                    } else if (this.parameters.isCenterToCurrentRow()) {
 
                         Envelope envelope = geom
-                                .getEnvelope().getGeometry().buffer(getBufferSize()).getEnvelope();
+                                .getEnvelope().getGeometry().buffer(this.parameters.getBufferSize()).getEnvelope();
                         center(mapContext, envelope);
 
                     } else {
                         //DO NOTHING ??
                     }
-                    if(this.isHighlightRecord()){
+                    if(this.parameters.isHighlightRecord()){
                         GraphicLayer graphicsLayer = mapContext.getGraphicsLayer();
                         graphicsLayer.clear();
-                        int idSymbol = graphicsLayer.addSymbol(this.highlightSymbol);
-                        //TODO: Decidir si aplicamos el simbolo a la geometría o al resto
-//                        geom = mapContext.getViewPort().getAdjustedEnvelope().getGeometry().difference(geom);
+                        int idSymbol = graphicsLayer.addSymbol(this.parameters.getHighlightSymbol(this.store));
+                        if(this.parameters.isApplySymbolToRecord()){
+                            //Do nothing, is the default behavior
+                        }
+                        if(this.parameters.isApplySymbolToEverythingExceptRecord()){
+                            geom = mapContext.getViewPort().getAdjustedEnvelope().getGeometry().difference(geom);
+                        }
                         graphicsLayer.addGraphic("", geom, idSymbol);
                     }
                 }
@@ -484,13 +447,11 @@
         desktop.open(pdfFile);
     }
     
-    private LayoutPanel loadTemplate() throws Exception {
-        ResourcesStorage resources = store.getResourcesStorage();
-        if (resources == null) {
+    private LayoutPanel getTemplateAsLayout() throws Exception {
+        ResourcesStorage.Resource resource = getTemplateAsResource();
+        if(resource == null){
             return null;
         }
-        String templateName = this.json.getString(LAYOUT_REPORT_TEMPLATE_NAME, LAYOUT_REPORT_DEFAULT_TEMPLATE_NAME); // "1.layout"...
-        ResourcesStorage.Resource resource = resources.getResource(templateName);
         InputStream is = null;
         try {
             is = resource.asInputStream();
@@ -505,6 +466,17 @@
         }
     }
     
+    @Override
+    public ResourcesStorage.Resource getTemplateAsResource() {
+        ResourcesStorage resources = store.getResourcesStorage();
+        if (resources == null) {
+            return null;
+        }
+        String templateName = this.parameters.getTemplateName(); //.getString(LAYOUT_REPORT_TEMPLATE_NAME, LAYOUT_REPORT_DEFAULT_TEMPLATE_NAME); // "1.layout"...
+        ResourcesStorage.Resource resource = resources.getResource(templateName);
+        return resource;
+    }
+    
     public MutableSymbolTable getSymbolTable() {
         if( this.symbolTable == null ) {
             this.symbolTable = ExpressionUtils.createSymbolTable();
@@ -530,87 +502,9 @@
         );
         return x;
     }
-
-    @Override
-    public boolean isCenterToCurrentRow() {
-        return this.centerToCurrentRow;
-    }
-
-    @Override
-    public void setCenterToCurrentRow(boolean centerToCurrentRow) {
-        this.centerToCurrentRow = centerToCurrentRow;
-    }
     
-    @Override
-    public boolean isZoomToCurrentRow() {
-        return this.zoomToCurrentRow;
+    public LayoutReportActionParameters getParameters() {
+        return this.parameters;
     }
 
-    @Override
-    public void setZoomToCurrentRow(boolean zoomToCurrentRow) {
-        this.zoomToCurrentRow = zoomToCurrentRow;
-    }
-    
-    @Override
-    public double getBufferSize() {
-        return bufferSize;
-    }
-
-    @Override
-    public void setBufferSize(double bufferSize) {
-        this.bufferSize = bufferSize;
-    }
-    
-    @Override
-    public String getViewTag() {
-        return viewTag;
-    }
-
-    @Override
-    public void setViewTag(String viewTag) {
-        this.viewTag = viewTag;
-    }
-    
-    public  boolean isUseInternalPdfViewer() {
-        return useInternalPdfViewer;
-    }
-
-    @Override
-    public void setUseInternalPdfViewer(boolean useInternalPdfViewer) {
-        this.useInternalPdfViewer = useInternalPdfViewer;
-    }
-
-    @Override
-    public boolean isHighlightRecord() {
-        return this.highlightRecord;
-    }
-   
-    @Override
-    public void setHighlightRecord(boolean b) {
-        this.highlightRecord = b;
-    }
-
-    private ISymbol createSymbol(String s) {
-        FeatureAttributeDescriptor geomAttr = this.store.getDefaultFeatureTypeQuietly().getDefaultGeometryAttribute();
-        if (geomAttr == null) {
-            return null;
-        }
-        int geomType = geomAttr.getGeomType().getType();
-
-        try {
-            if (StringUtils.isBlank(s)) {
-                return MapContextLocator.getMapContextManager().createSymbol(geomType);
-            }
-
-            byte[] bytes = Hex.decodeHex(s.toCharArray());
-            PersistenceManager persistenceManager = ToolsLocator.getPersistenceManager();
-            InputStream in = new ByteArrayInputStream(bytes);
-            ISymbol symbol = (ISymbol) persistenceManager.getObject(in);
-            return symbol;
-        } catch (DecoderException ex) {
-            return MapContextLocator.getMapContextManager().createSymbol(geomType);
-        }
-
-    }
-
 }
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/LayoutReportActionParameters.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/LayoutReportActionParameters.java	(revision 0)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/report/LayoutReportActionParameters.java	(revision 1608)
@@ -0,0 +1,82 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.gvsig.app.project.documents.layout.report;
+
+import java.io.IOException;
+import org.gvsig.app.project.documents.layout.LayoutDocument;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.json.SupportJson;
+
+/**
+ *
+ * @author fdiaz
+ */
+public interface LayoutReportActionParameters extends SupportJson {
+    
+    public static LayoutReportActionParameters create(){
+        return new LayoutReportActionParametersImpl();
+    }
+    
+    public static LayoutReportActionParameters create(String name){
+        return new LayoutReportActionParametersImpl(name);
+    }
+
+    public String getIdentifier();
+
+    public void setIdentifier(String identifier);
+
+    public String getLabel();
+
+    public void setLabel(String label);
+
+    public boolean isCenterToCurrentRow();
+
+    public void setCenterToCurrentRow(boolean centerToCurrentRow);
+
+    public boolean isZoomToCurrentRow();
+
+    public void setZoomToCurrentRow(boolean zoomToCurrentRow);
+
+    public double getBufferSize();
+
+    public void setBufferSize(double bufferSize);
+
+    public boolean isHighlightRecord();
+
+    public void setHighlightRecord(boolean b);
+
+    public boolean isApplySymbolToRecord();
+
+    public void setApplySymbolToRecord(boolean b);
+
+    public boolean isApplySymbolToEverythingExceptRecord();
+
+    public void setApplySymbolToEverythingExceptRecord(boolean b);
+
+    public boolean isUseInternalPdfViewer();
+
+    public void setUseInternalPdfViewer(boolean useInternalPdfViewer);
+
+    public String getViewTag();
+
+    public void setViewTag(String tag);
+    
+    public ISymbol getHighlightSymbol(FeatureStore featureStore);
+    
+    public void setHighlightSymbol(ISymbol symbol);
+    
+    public String getHighlightSymbolSerialized();
+
+    public void setHighlightSymbolSerialized(String symbol);
+
+    public void setTemplateName(String templateName);
+
+    public String getTemplateName();
+
+    public void save(FeatureStore store, LayoutDocument layout) throws IOException;
+    
+}
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/LayoutReportActionParametersImpl.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/LayoutReportActionParametersImpl.java	(revision 0)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/report/LayoutReportActionParametersImpl.java	(revision 1608)
@@ -0,0 +1,408 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.gvsig.app.project.documents.layout.report;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+import javax.json.JsonNumber;
+import javax.json.JsonObject;
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.app.project.documents.Document;
+import org.gvsig.app.project.documents.layout.LayoutDocument;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.json.Json;
+import org.gvsig.json.JsonObjectBuilder;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dispose.DisposeUtils;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.gvsig.tools.resourcesstorage.ResourcesStorage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author fdiaz
+ */
+public class LayoutReportActionParametersImpl implements LayoutReportActionParameters {
+    private static final Logger LOGGER = LoggerFactory.getLogger(LayoutReportActionParametersImpl.class);
+
+    private final String LAYOUT_REPORT_BUFFER_SIZE = "bufferSize";
+    private final String LAYOUT_REPORT_CENTER_TO_CURRENT_ROW = "centerToCurrentRow";
+    private final String LAYOUT_REPORT_DEFAULT_TEMPLATE_NAME = "layout";
+    private final String LAYOUT_REPORT_LABEL = "label";
+    private final String LAYOUT_REPORT_NAME = "name";
+    private final String LAYOUT_REPORT_TEMPLATE_NAME = "templateName";
+    private final String LAYOUT_REPORT_HIGHLIGHT_RECORD = "highlightRecord";
+    private final String LAYOUT_REPORT_HIGHLIGHT_SYMBOL = "highlightSymbol";
+    private final String LAYOUT_REPORT_SYMBOL_TO_RECORD = "applySymbolToRecord";
+    private final String LAYOUT_REPORT_SYMBOL_TO_EVERYTHING_EXCEPT_RECORD = "applySymbolToEverythinfExceptRecord";
+    private final String LAYOUT_REPORT_TYPE = "type";
+    private final String LAYOUT_REPORT_VIEW_TAG = "viewTag";
+    private final String LAYOUT_REPORT_USE_INTERNAL_PDF_VIEWER = "useInternalPdfViewer";
+    private final String LAYOUT_REPORT_ZOOM_TO_CURRENT_ROW = "zoomToCurrentRow";
+    
+    private String identifier;
+    private String label;
+    private boolean centerToCurrentRow;
+    private boolean zoomToCurrentRow;
+    private double bufferSize;
+    private boolean useInternalPdfViewer;
+    private boolean highlightRecord;
+    private String viewTag;
+    private ISymbol highlightSymbol;
+    private String highlightSymbolSerialized;
+    private boolean applySymbolToRecord;
+    private boolean applySymbolToEverythingExceptRecord;
+    private String templateName;
+
+    LayoutReportActionParametersImpl() {
+    }
+
+    LayoutReportActionParametersImpl(String name) {
+        this.identifier = name;
+        this.label = name;
+    }
+    
+    
+    @Override
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    @Override
+    public void setIdentifier(String identifier) {
+        this.identifier = identifier;
+    }
+
+    @Override
+    public String getLabel() {
+        return this.label;
+    }
+
+    @Override
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    @Override
+    public boolean isCenterToCurrentRow() {
+        return this.centerToCurrentRow;
+    }
+
+    @Override
+    public void setCenterToCurrentRow(boolean centerToCurrentRow) {
+        this.centerToCurrentRow = centerToCurrentRow;
+    }
+
+    @Override
+    public boolean isZoomToCurrentRow() {
+        return this.zoomToCurrentRow;
+    }
+
+    @Override
+    public void setZoomToCurrentRow(boolean zoomToCurrentRow) {
+        this.zoomToCurrentRow = zoomToCurrentRow;
+    }
+
+    @Override
+    public double getBufferSize() {
+        return this.bufferSize;
+    }
+
+    @Override
+    public void setBufferSize(double bufferSize) {
+        this.bufferSize = bufferSize;
+    }
+
+    @Override
+    public boolean isHighlightRecord() {
+        return this.highlightRecord;
+    }
+
+    @Override
+    public void setHighlightRecord(boolean b) {
+        this.highlightRecord = b;
+    }
+    
+    @Override
+    public boolean isApplySymbolToRecord() {
+        return this.applySymbolToRecord;
+    }
+
+    @Override
+    public void setApplySymbolToRecord(boolean b) {
+        this.applySymbolToRecord = b;
+    }
+
+    @Override
+    public boolean isApplySymbolToEverythingExceptRecord() {
+        return this.applySymbolToEverythingExceptRecord;
+    }
+
+    @Override
+    public void setApplySymbolToEverythingExceptRecord(boolean b) {
+        this.applySymbolToEverythingExceptRecord = b;
+    }
+
+    @Override
+    public boolean isUseInternalPdfViewer() {
+        return useInternalPdfViewer;
+    }
+
+    @Override
+    public void setUseInternalPdfViewer(boolean useIntervalPdfViewer) {
+        this.useInternalPdfViewer = useIntervalPdfViewer;
+    }
+    
+    @Override
+    public String getViewTag() {
+        return this.viewTag;
+    }
+
+    @Override
+    public void setViewTag(String viewTag) {
+        this.viewTag = viewTag;
+    }
+
+    @Override
+    public ISymbol getHighlightSymbol(FeatureStore featureStore) {
+        if(this.highlightSymbol == null){
+            this.highlightSymbol = createSymbol(featureStore, this.highlightSymbolSerialized);
+        }
+        return this.highlightSymbol;
+    }
+
+    @Override
+    public void setHighlightSymbol(ISymbol symbol) {
+        this.highlightSymbol = symbol;
+        this.highlightSymbolSerialized = null;
+    }
+    
+    @Override
+    public String getHighlightSymbolSerialized() {
+        if(this.highlightSymbolSerialized == null){
+            this.highlightSymbolSerialized = createSymbolSerialized(this.highlightSymbol);
+        }
+        return this.highlightSymbolSerialized;
+    }
+
+    @Override
+    public void setHighlightSymbolSerialized(String symbol) {
+        this.highlightSymbolSerialized = symbol;
+        this.highlightSymbol = null;
+    }
+    
+    @Override
+    public String getTemplateName() {
+        return this.templateName;
+    }
+    
+    @Override
+    public void setTemplateName(String templateName) {
+        this.templateName = templateName;
+    }
+
+    private static ISymbol createSymbol(FeatureStore featureStore, String s) {
+        FeatureAttributeDescriptor geomAttr = featureStore.getDefaultFeatureTypeQuietly().getDefaultGeometryAttribute();
+        if (geomAttr == null) {
+            return null;
+        }
+        int geomType = geomAttr.getGeomType().getType();
+
+        try {
+            if (StringUtils.isBlank(s)) {
+                return MapContextLocator.getMapContextManager().createSymbol(geomType);
+            }
+
+            byte[] bytes = Hex.decodeHex(s.toCharArray());
+            PersistenceManager persistenceManager = ToolsLocator.getPersistenceManager();
+            InputStream in = new ByteArrayInputStream(bytes);
+            ISymbol symbol = (ISymbol) persistenceManager.getObject(in);
+            return symbol;
+        } catch (DecoderException ex) {
+            return MapContextLocator.getMapContextManager().createSymbol(geomType);
+        }
+
+    }
+    
+    private static String createSymbolSerialized(ISymbol symbol){
+        try {
+            if(symbol == null){
+                return null;
+            }
+            PersistenceManager persistenceManager = ToolsLocator.getPersistenceManager();
+            PersistentState state = persistenceManager.getState(symbol);
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            persistenceManager.saveState(state, out);
+            return Hex.encodeHexString(out.toByteArray());
+        } catch (Exception ex) {
+            throw new RuntimeException("Can't persist symbol", ex);
+        }
+    }
+    
+
+    @Override
+    public void fromJson(JsonObject json) {
+    this.templateName = json.getString(LAYOUT_REPORT_TEMPLATE_NAME, LAYOUT_REPORT_DEFAULT_TEMPLATE_NAME); // "1.layout"...
+    
+    this.identifier = json.getString(LAYOUT_REPORT_NAME, null);
+    this.label = json.getString(LAYOUT_REPORT_LABEL, this.identifier);
+    this.highlightRecord = json.getBoolean(LAYOUT_REPORT_HIGHLIGHT_RECORD, true);
+    this.highlightSymbol = null;
+    this.highlightSymbolSerialized = json.getString(LAYOUT_REPORT_HIGHLIGHT_SYMBOL, null);
+    this.applySymbolToRecord = json.getBoolean(LAYOUT_REPORT_SYMBOL_TO_RECORD, false);
+    this.applySymbolToEverythingExceptRecord = json.getBoolean(LAYOUT_REPORT_SYMBOL_TO_EVERYTHING_EXCEPT_RECORD, false);
+
+    this.centerToCurrentRow = json.getBoolean(LAYOUT_REPORT_CENTER_TO_CURRENT_ROW, true);
+    this.zoomToCurrentRow = json.getBoolean(LAYOUT_REPORT_ZOOM_TO_CURRENT_ROW, true);
+    this.bufferSize = 0.0;
+    if(json.containsKey(LAYOUT_REPORT_BUFFER_SIZE)){
+        JsonNumber theSize = json.getJsonNumber(LAYOUT_REPORT_BUFFER_SIZE);
+        if(theSize != null){
+            this.bufferSize = theSize.doubleValue();
+        }
+    } 
+    this.setViewTag(json.getString(LAYOUT_REPORT_VIEW_TAG, null));
+    this.useInternalPdfViewer = json.getBoolean(LAYOUT_REPORT_USE_INTERNAL_PDF_VIEWER, true);
+    }
+
+    @Override
+    public JsonObjectBuilder toJsonBuilder() {
+        JsonObjectBuilder jsonBuilder = Json.createObjectBuilder();
+        jsonBuilder.add(LAYOUT_REPORT_NAME, this.identifier);
+        jsonBuilder.add(LAYOUT_REPORT_TYPE, LayoutReportActionFactory.LAYOUT_REPORT_ACTION_NAME);
+        jsonBuilder.add(LAYOUT_REPORT_LABEL, this.label);
+        jsonBuilder.add(LAYOUT_REPORT_TEMPLATE_NAME, this.templateName);
+        if (highlightSymbol != null) {
+            jsonBuilder.add(LAYOUT_REPORT_HIGHLIGHT_SYMBOL, this.getHighlightSymbolSerialized());
+        }
+        jsonBuilder.add(LAYOUT_REPORT_CENTER_TO_CURRENT_ROW, this.centerToCurrentRow);
+        jsonBuilder.add(LAYOUT_REPORT_ZOOM_TO_CURRENT_ROW, this.zoomToCurrentRow);
+        jsonBuilder.add(LAYOUT_REPORT_BUFFER_SIZE, this.bufferSize);
+        jsonBuilder.add(LAYOUT_REPORT_HIGHLIGHT_RECORD, this.highlightRecord);
+        jsonBuilder.add(LAYOUT_REPORT_SYMBOL_TO_RECORD, this.applySymbolToRecord);
+        jsonBuilder.add(LAYOUT_REPORT_SYMBOL_TO_EVERYTHING_EXCEPT_RECORD, this.applySymbolToEverythingExceptRecord);
+        jsonBuilder.add(LAYOUT_REPORT_VIEW_TAG, this.viewTag);
+        jsonBuilder.add(LAYOUT_REPORT_USE_INTERNAL_PDF_VIEWER, this.useInternalPdfViewer);
+        
+        return jsonBuilder;
+    }
+
+    @Override
+    public void save(FeatureStore store, LayoutDocument layout) throws IOException {
+        ResourcesStorage.Resource resource = null;
+        ResourcesStorage.Resource resourceLayout = null;
+        boolean persistentIndependentSave = false;
+        try {
+            ResourcesStorage resources = store.getResourcesStorage();
+            
+            String resourceName = getResourceName(resources, this.identifier);
+            if(resourceName == null){
+                resourceName = getNextResourceName(resources, "report");
+            }
+            String theTemplateName = this.templateName;
+            if(StringUtils.isBlank(this.templateName)){
+                theTemplateName = LayoutReportActionFactory.LAYOUT_REPORT_ACTION_NAME;
+                if(StringUtils.contains(resourceName, resources.getSeparator())){
+                    theTemplateName = StringUtils.replaceIgnoreCase(
+                            resourceName, 
+                            resources.getSeparator()+"report", 
+                            resources.getSeparator()+LayoutReportActionFactory.LAYOUT_REPORT_ACTION_NAME);
+                }
+                this.templateName = theTemplateName;
+            }
+            
+            resource = resources.getResource(resourceName);
+            IOUtils.write(this.toJson().toString(), resource.asOutputStream(), StandardCharsets.UTF_8);
+            
+            if(layout != null) {
+                persistentIndependentSave = layout.isPersistIndependent();
+                resourceLayout = resources.getResource(theTemplateName);
+                PersistenceManager persistenceManager = ToolsLocator.getPersistenceManager();
+                layout.setPersistIndependent(true);
+                PersistentState persistentState = persistenceManager.getState(layout.getMainWindow());
+                persistenceManager.saveState(persistentState, resourceLayout.asOutputStream());
+            }
+        } catch (PersistenceException ex) {
+            throw new IOException("Can't persist LayoutReportActionParameters", ex);
+        } finally {
+            if(layout != null){
+                layout.setPersistIndependent(persistentIndependentSave);
+            }
+            IOUtils.closeQuietly(resource);
+            IOUtils.closeQuietly(resourceLayout);
+        }
+    }
+    
+    private String getNextResourceName(ResourcesStorage resources, String resourceName){
+        List<ResourcesStorage.Resource> reports = resources.getResources(resourceName);
+        if(reports == null || reports.isEmpty()){
+            return resourceName;
+        }
+        int n = -1;
+        for (ResourcesStorage.Resource report : reports) {
+            if(StringUtils.contains(report.getName(), resources.getSeparator())){
+                String[] s = StringUtils.split(report.getName(), resources.getSeparator());
+                n = Math.max(n, Integer.parseInt(s[0]));
+            } else {
+                n=0;
+            }
+        }
+        
+        if (n < 0) {
+            return resourceName;
+        }
+        
+        n++;
+        return String.valueOf(n) + resources.getSeparator() + resourceName;
+
+        
+    }
+    
+    private String getResourceName(ResourcesStorage resources, String reportName) {
+        try {
+            if (resources != null) {
+                List<ResourcesStorage.Resource> reportsResources = resources.getResources("report");
+                if (reportsResources != null && !reportsResources.isEmpty()) {
+                    for (ResourcesStorage.Resource resource : reportsResources) {
+                        InputStream is = null;
+                        try {
+                            is = resource.asInputStream();
+                            JsonObject json = javax.json.Json.createReader(is).readObject();
+                            String name = json.getString(LAYOUT_REPORT_NAME, null);
+                            if(StringUtils.equalsIgnoreCase(name, reportName)){
+                                return resource.getName();
+                            }
+                        } catch (Exception ex) {
+                            LOGGER.warn("Can't load report form resource (" + resource.getURL() + ")", ex);
+                        } finally {
+                            IOUtils.closeQuietly(is);
+                        }
+                        DisposeUtils.disposeQuietly(resource);
+                    }
+                }
+            }
+        } finally {
+            DisposeUtils.disposeQuietly(resources);
+        }
+        return null;
+    }
+    
+    
+    
+}
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutParameters.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutParameters.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutParameters.java	(revision 1608)
@@ -1,73 +0,0 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.gvsig.app.extension.reportfromlayout;
-
-import java.awt.Color;
-import org.gvsig.app.project.documents.layout.LayoutDocument;
-import org.gvsig.fmap.dal.feature.FeatureStore;
-import org.gvsig.fmap.dal.swing.report.ReportAction;
-import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
-
-/**
- *
- * @author fdiaz
- */
-public interface ConfigureReportFromLayoutParameters {
-    
-    public LayoutDocument getLayout();
-
-    public void setLayout(LayoutDocument layout);
-
-    public FeatureStore getSource();
-
-    public void setSource(FeatureStore source);
-
-    public String getIdentifier();
-
-    public void setIdentifier(String identifier);
-
-    public String getLabel();
-
-    public void setLabel(String label);
-
-    public boolean isCenterToCurrentRow();
-
-    public void setCenterToCurrentRow(boolean centerToCurrentRow);
-
-    public boolean isZoomToCurrentRow();
-
-    public void setZoomToCurrentRow(boolean zoomToCurrentRow);
-
-    public double getBufferSize();
-
-    public void setBufferSize(double bufferSize);
-
-    public boolean isHighlightRecord();
-
-    public void setHighlightRecord(boolean b);
-
-    public boolean isUseIntervalPdfViewer();
-
-    public void setUseIntervalPdfViewer(boolean useIntervalPdfViewer);
-
-    public String getViewTag();
-
-    public void setViewTag(String tag);
-    
-//    public Color getFillColor();
-//    
-//    public void setFillColor(Color color);
-//
-//    public Color getLineColor();
-//    
-//    public void setLineColor(Color color);
-
-    public ISymbol getHighlightSymbol();
-    
-    public void setHighlightSymbol(ISymbol symbol);
-
-    
-}
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutParametersImpl.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutParametersImpl.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutParametersImpl.java	(revision 1608)
@@ -1,164 +0,0 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.gvsig.app.extension.reportfromlayout;
-
-import java.awt.Color;
-import org.gvsig.app.project.documents.layout.LayoutDocument;
-import org.gvsig.fmap.dal.feature.FeatureStore;
-import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
-
-/**
- *
- * @author fdiaz
- */
-public class ConfigureReportFromLayoutParametersImpl implements ConfigureReportFromLayoutParameters {
-    LayoutDocument layout;
-    FeatureStore source;
-    String identifier;
-    String label;
-    private boolean centerToCurrentRow;
-    private boolean zoomToCurrentRow;
-    private double bufferSize;
-    private boolean useIntervalPdfViewer;
-    private boolean highlightRecord;
-    private String viewTag;
-//    private Color fillColor;
-//    private Color lineColor;
-    private ISymbol highLightSymbol;
-
-    @Override
-    public LayoutDocument getLayout() {
-        return layout;
-    }
-
-    @Override
-    public void setLayout(LayoutDocument layout) {
-        this.layout = layout;
-    }
-
-    @Override
-    public FeatureStore getSource() {
-        return source;
-    }
-
-    @Override
-    public void setSource(FeatureStore source) {
-        this.source = source;
-    }
-
-    @Override
-    public String getIdentifier() {
-        return identifier;
-    }
-
-    @Override
-    public void setIdentifier(String identifier) {
-        this.identifier = identifier;
-    }
-
-    @Override
-    public String getLabel() {
-        return this.label;
-    }
-
-    @Override
-    public void setLabel(String label) {
-        this.label = label;
-    }
-
-    @Override
-    public boolean isCenterToCurrentRow() {
-        return this.centerToCurrentRow;
-    }
-
-    @Override
-    public void setCenterToCurrentRow(boolean centerToCurrentRow) {
-        this.centerToCurrentRow = centerToCurrentRow;
-    }
-
-    @Override
-    public boolean isZoomToCurrentRow() {
-        return this.zoomToCurrentRow;
-    }
-
-    @Override
-    public void setZoomToCurrentRow(boolean zoomToCurrentRow) {
-        this.zoomToCurrentRow = zoomToCurrentRow;
-    }
-
-    @Override
-    public double getBufferSize() {
-        return this.bufferSize;
-    }
-
-    @Override
-    public void setBufferSize(double bufferSize) {
-        this.bufferSize = bufferSize;
-    }
-
-    @Override
-    public boolean isHighlightRecord() {
-        return this.highlightRecord;
-    }
-
-    @Override
-    public void setHighlightRecord(boolean b) {
-        this.highlightRecord = b;
-    }
-
-    @Override
-    public boolean isUseIntervalPdfViewer() {
-        return useIntervalPdfViewer;
-    }
-
-    @Override
-    public void setUseIntervalPdfViewer(boolean useIntervalPdfViewer) {
-        this.useIntervalPdfViewer = useIntervalPdfViewer;
-    }
-    
-    @Override
-    public String getViewTag() {
-        return this.viewTag;
-    }
-
-    @Override
-    public void setViewTag(String viewTag) {
-        this.viewTag = viewTag;
-    }
-
-//    @Override
-//    public Color getFillColor() {
-//        return this.fillColor;
-//    }
-//
-//    @Override
-//    public void setFillColor(Color color) {
-//        this.fillColor = color;
-//    }
-//
-//    @Override
-//    public Color getLineColor() {
-//        return this.lineColor;
-//    }
-//
-//    @Override
-//    public void setLineColor(Color color) {
-//        this.lineColor = color;
-//    }
-
-    @Override
-    public ISymbol getHighlightSymbol() {
-        return highLightSymbol;
-    }
-
-    @Override
-    public void setHighlightSymbol(ISymbol symbol) {
-        this.highLightSymbol = symbol;
-    }
-
-    
-    
-}
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayout.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayout.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayout.java	(revision 1608)
@@ -8,9 +8,6 @@
 import java.awt.Dimension;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
 import java.util.List;
 import java.util.function.Predicate;
 import javax.json.JsonObject;
@@ -18,46 +15,37 @@
 import javax.swing.JComponent;
 import javax.swing.JOptionPane;
 import javax.swing.SwingUtilities;
+import javax.swing.event.ChangeEvent;
 import javax.swing.event.DocumentEvent;
 import javax.swing.event.DocumentListener;
 import javax.swing.event.TreeSelectionEvent;
-import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.gvsig.app.ApplicationLocator;
-import org.gvsig.app.gui.styling.SymbolSelector;
 import org.gvsig.app.project.documents.Document;
 import org.gvsig.app.project.documents.layout.LayoutDocument;
 import org.gvsig.app.project.documents.layout.fframes.FFrameView;
 import org.gvsig.app.project.documents.layout.fframes.IFFrame;
 import org.gvsig.app.project.documents.layout.report.LayoutReportAction;
 import org.gvsig.app.project.documents.layout.report.LayoutReportActionFactory;
-import org.gvsig.app.project.documents.layout.report.LayoutReportActionImpl;
-import org.gvsig.app.project.documents.view.legend.gui.ISymbolSelector;
-import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.app.project.documents.layout.report.LayoutReportActionParameters;
 import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.dal.swing.DALSwingLocator;
 import org.gvsig.fmap.dal.swing.DataSwingManager;
 import org.gvsig.fmap.dal.swing.report.ReportAction;
 import org.gvsig.fmap.dal.swing.storesrepository.StoresRepositoryController;
-import org.gvsig.fmap.mapcontext.MapContextLocator;
 import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
-import org.gvsig.json.Json;
-import org.gvsig.json.JsonObjectBuilder;
+import org.gvsig.symbology.swing.SymbologySwingLocator;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dispose.DisposeUtils;
 import org.gvsig.tools.i18n.I18nManager;
-import org.gvsig.tools.persistence.PersistenceManager;
-import org.gvsig.tools.persistence.PersistentState;
-import org.gvsig.tools.resourcesstorage.ResourcesStorage;
 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.ToolsSwingUtils;
 import org.gvsig.tools.swing.api.documentfilters.PositiveDoubleDocumentFilter;
+import org.gvsig.tools.swing.api.pickercontroller.PickerController;
 import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
 import org.gvsig.tools.swing.api.windowmanager.Dialog;
-import org.gvsig.tools.swing.api.windowmanager.WindowManager;
 import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
 import org.gvsig.tools.util.LabeledValue;
 import org.gvsig.tools.util.LabeledValueImpl;
@@ -71,11 +59,14 @@
 public class ConfigureReportFromLayout extends ConfigureReportFromLayoutPanelView {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureReportFromLayout.class);
+    private static final int TO_RECORD_VALUE = 1;
+    private static final int TO_EVERYTIHNG_EXCEPT_RECORD_VALUE = 2;
 
     private StoresRepositoryController treeSourceController;
     private FeatureStore source;
     private Dialog dialog;
     private ISymbol highlightSymbol;
+    private PickerController<ISymbol> symbolPicker;
 
     public ConfigureReportFromLayout() {
         this.initComponents();
@@ -127,12 +118,17 @@
             doUpdateComponents();
         });
         
-        this.btnSelectSymbol.addActionListener((ActionEvent e) -> {
-            doSelectSymbol();
+        this.chkHighlightRecord.addActionListener((ActionEvent e) -> {
+            doUpdateComponents();
         });
         
-        ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager();
+        fillCboApplyTo();
         
+        this.symbolPicker = SymbologySwingLocator.getSwingManager().createSymbolPickerController(btnSelectSymbol, highlightSymbol);
+        this.symbolPicker.addChangeListener((ChangeEvent e) -> {
+            this.highlightSymbol = this.symbolPicker.get();
+        });
+        
         PositiveDoubleDocumentFilter.install(txtBufferSize);
         
         Dimension screensize = ApplicationLocator.getApplicationManager().getUIManager().getInternalSize();
@@ -166,29 +162,12 @@
         doUpdateComponents();
     }
     
-    private void doSelectSymbol() {
-
-        if(this.source == null){
-            return;
-        }
-        FeatureAttributeDescriptor geomAttr = this.source.getDefaultFeatureTypeQuietly().getDefaultGeometryAttribute();
-        if(geomAttr == null){
-            return;
-        }
-        int geomType = geomAttr.getGeomType().getType();
-
-        if(this.highlightSymbol == null) {
-            this.highlightSymbol = MapContextLocator.getMapContextManager().createSymbol(geomType);
-        }
-        ISymbolSelector symSel = SymbolSelector.createSymbolSelector(this.highlightSymbol, geomType);
-
-        WindowManager_v2 windowManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager();
-        windowManager.showWindow((JComponent)symSel, "_Symbol", WindowManager.MODE.DIALOG);
-        this.highlightSymbol = (ISymbol) symSel.getSelectedObject();
-
-    }
+//    private void doChangeApplySymbolTo() {
+//        Object item = cboApplySymbolTo.getSelectedItem();
+//       ((LabeledValue)item)
+//        doUpdateComponents();
+//    }
     
-
     private void doUpdateComponents() {
         this.treeSourceController.setEnabled(true);
 
@@ -196,6 +175,9 @@
         
         this.txtBufferSize.setEnabled(this.chkZoomToCurrentRow.isSelected());
         
+        this.btnSelectSymbol.setEnabled(this.chkHighlightRecord.isSelected());
+        this.cboApplySymbolTo.setEnabled(this.chkHighlightRecord.isSelected());
+        
         if(this.dialog != null){
             boolean enabled = (this.source != null) && (this.getLayoutDocument() != null) && StringUtils.isNotBlank(this.txtIdentifier.getText());
             this.dialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, enabled);
@@ -265,7 +247,18 @@
         }
         this.cboView.setModel(model);
     }
+
+    private void fillCboApplyTo() {
+        DefaultComboBoxModel<LabeledValue<Integer>> model = new DefaultComboBoxModel();
+        I18nManager i18n = ToolsLocator.getI18nManager();
+        
+        model.addElement(new LabeledValueImpl<>(i18n.getTranslation("_to_record"), TO_RECORD_VALUE));
+        model.addElement(new LabeledValueImpl<>(i18n.getTranslation("_to_everything_except_record"), TO_EVERYTIHNG_EXCEPT_RECORD_VALUE));
+        
+        this.cboApplySymbolTo.setModel(model);
+    }
     
+    
     private LayoutReportAction getReportAction(){
         LabeledValue<LayoutReportAction> selected = (LabeledValue<LayoutReportAction>)cboReport.getSelectedItem();
         if(selected == null){
@@ -274,7 +267,7 @@
         return selected.getValue();
     }
     
-    private LayoutDocument getLayoutDocument(){
+    public LayoutDocument getLayoutDocument(){
         LabeledValue<LayoutDocument> selected = (LabeledValue<LayoutDocument>)cboLayout.getSelectedItem();
         if(selected == null){
             return null;
@@ -290,9 +283,9 @@
         return selected.getValue();
     }
     
-    public void fetch(ConfigureReportFromLayoutParameters params){
-        params.setLayout(this.getLayoutDocument());
-        params.setSource(this.source);
+    public void fetch(LayoutReportActionParameters params){
+//        params.setLayout(this.getLayoutDocument());
+//        params.setSource(this.source);
         params.setIdentifier(this.txtIdentifier.getText());
         params.setLabel(this.txtLabel.getText());
         
@@ -301,9 +294,28 @@
         double bufferSize = PositiveDoubleDocumentFilter.getValue(this.txtBufferSize);
         params.setBufferSize(bufferSize);
         params.setViewTag(this.getViewTag());
-        params.setUseIntervalPdfViewer(this.chkUseInternalPdfViewer.isSelected());
+        params.setUseInternalPdfViewer(this.chkUseInternalPdfViewer.isSelected());
         params.setHighlightRecord(this.chkHighlightRecord.isSelected());
         params.setHighlightSymbol(this.highlightSymbol);
+        Object applyToItem = this.cboApplySymbolTo.getSelectedItem();
+        if(applyToItem == null){
+            params.setApplySymbolToRecord(false);
+            params.setApplySymbolToEverythingExceptRecord(false);
+        } else {
+            switch ((int)((LabeledValue)applyToItem).getValue()) {
+                case TO_RECORD_VALUE:
+                    params.setApplySymbolToRecord(true);
+                    params.setApplySymbolToEverythingExceptRecord(false);
+                    break;
+                case TO_EVERYTIHNG_EXCEPT_RECORD_VALUE:
+                    params.setApplySymbolToRecord(false);
+                    params.setApplySymbolToEverythingExceptRecord(true);
+                    break;
+                default:
+                    params.setApplySymbolToRecord(false);
+                    params.setApplySymbolToEverythingExceptRecord(false);
+            }
+        }
     }
 
     private void translate() {
@@ -322,11 +334,13 @@
         manager.translate(txtBufferSize);
         manager.translate(chkHighlightRecord);
         manager.translate(btnSelectSymbol);
+        manager.translate(lblAppySymbolTo);
+        manager.translate(cboApplySymbolTo);
     }
     
-    public boolean doConfigureReportFromLayout(ConfigureReportFromLayoutParameters params) {
-        LayoutDocument layout = params.getLayout();
-        FeatureStore source = params.getSource();
+    public boolean doConfigureReportFromLayout(LayoutReportActionParameters params, LayoutDocument layout, FeatureStore source) {
+//        LayoutDocument layout = params.getLayout();
+//        FeatureStore source = params.getSource();
         String identifier = params.getIdentifier();
         String label = params.getLabel();
         
@@ -364,8 +378,10 @@
         boolean zoomToCurrentRow = params.isZoomToCurrentRow();
         double bufferSize = params.getBufferSize();
         boolean highlightRecord = params.isHighlightRecord();
-        ISymbol highlightSymbol = params.getHighlightSymbol();
-        boolean useInternalPdfViewer = params.isUseIntervalPdfViewer();
+        ISymbol highlightSymbol = params.getHighlightSymbol(source);
+        boolean applySymbolToRecord = params.isApplySymbolToRecord();
+        boolean applySymbolToEverythingExceptRecord = params.isApplySymbolToEverythingExceptRecord();
+        boolean useInternalPdfViewer = params.isUseInternalPdfViewer();
         String viewTag = params.getViewTag();
                 
         return doConfigureReportFromLayout(
@@ -378,6 +394,8 @@
                 bufferSize, 
                 highlightRecord,
                 highlightSymbol,
+                applySymbolToRecord,
+                applySymbolToEverythingExceptRecord,
                 viewTag,
                 useInternalPdfViewer);
         
@@ -394,47 +412,26 @@
             double bufferSize,
             boolean highlightRecord,
             ISymbol highlightSymbol,
+            boolean applySymbolToRecord,
+            boolean applySymbolToEverythingExceptRecord,
             String viewTag,
             boolean useInternalPdfViewer
     ) {
-        ResourcesStorage.Resource resource = null;
-        ResourcesStorage.Resource resourceLayout = null;
-        boolean selfContained = layout.isPersistIndependent();
         try {
-            ResourcesStorage resources = store.getResourcesStorage();
-            
-            String resourceName = getResourceName(resources, name);
-            if(resourceName == null){
-                resourceName = getNextResourceName(resources, "report");
-            }
-            
-            String templateName = LayoutReportActionFactory.LAYOUT_REPORT_ACTION_NAME;
-            if(StringUtils.contains(resourceName, resources.getSeparator())){
-                templateName = StringUtils.replaceIgnoreCase(resourceName, resources.getSeparator()+"report", resources.getSeparator()+LayoutReportActionFactory.LAYOUT_REPORT_ACTION_NAME);
-            }
-            JsonObjectBuilder jsonBuilder = Json.createObjectBuilder();
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_NAME, name);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_TYPE, LayoutReportActionFactory.LAYOUT_REPORT_ACTION_NAME);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_LABEL, label);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_TEMPLATE_NAME, templateName);
-            if(highlightSymbol != null){
-                jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_HIGHLIGHT_SYMBOL, this.toString(highlightSymbol));
-            }
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_CENTER_TO_CURRENT_ROW, centerToCurrentRow);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_ZOOM_TO_CURRENT_ROW, zoomToCurrentRow);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_BUFFER_SIZE, bufferSize);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_HIGHLIGHT_RECORD, highlightRecord);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_VIEW_TAG, viewTag);
-            jsonBuilder.add(LayoutReportActionImpl.LAYOUT_REPORT_USE_INTERNAL_PDF_VIEWER, useInternalPdfViewer);
-            
-            resource = resources.getResource(resourceName);
-            IOUtils.write(jsonBuilder.toString(), resource.asOutputStream(), StandardCharsets.UTF_8);
-            
-            resourceLayout = resources.getResource(templateName);
-            PersistenceManager persistenceManager = ToolsLocator.getPersistenceManager();
-            layout.setPersistIndependent(true);
-            PersistentState persistentState = persistenceManager.getState(layout.getMainWindow());
-            persistenceManager.saveState(persistentState, resourceLayout.asOutputStream());
+            LayoutReportActionParameters reportParameters = LayoutReportActionParameters.create();
+            reportParameters.setIdentifier(name);
+            reportParameters.setLabel(label);
+            reportParameters.setHighlightSymbol(highlightSymbol);
+            reportParameters.setCenterToCurrentRow(centerToCurrentRow);
+            reportParameters.setZoomToCurrentRow(zoomToCurrentRow);
+            reportParameters.setBufferSize(bufferSize);
+            reportParameters.setHighlightRecord(highlightRecord);
+            reportParameters.setApplySymbolToRecord(applySymbolToRecord);
+            reportParameters.setApplySymbolToEverythingExceptRecord(applySymbolToEverythingExceptRecord);
+            reportParameters.setViewTag(viewTag);
+            reportParameters.setUseInternalPdfViewer(useInternalPdfViewer);
+
+            reportParameters.save(store, layout);
             ((JComponent)dialog).setVisible(false);
             return true;
         } catch (Exception ex) {
@@ -446,84 +443,9 @@
                     "_Configure_report_from_layout", 
                     JOptionPane.WARNING_MESSAGE);
             return false;
-        } finally {
-            layout.setPersistIndependent(selfContained);
-            IOUtils.closeQuietly(resource);
-            IOUtils.closeQuietly(resourceLayout);
         }
-        
     }
     
-    private String toString(ISymbol symbol){
-        try {
-            if(symbol == null){
-                return null;
-            }
-            PersistenceManager persistenceManager = ToolsLocator.getPersistenceManager();
-            PersistentState state = persistenceManager.getState(symbol);
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            persistenceManager.saveState(state, out);
-            return Hex.encodeHexString(out.toByteArray());
-        } catch (Exception ex) {
-            throw new RuntimeException("Can't persist symbol", ex);
-        }
-    }
-    
-    private String getNextResourceName(ResourcesStorage resources, String resourceName){
-        List<ResourcesStorage.Resource> reports = resources.getResources(resourceName);
-        if(reports == null || reports.isEmpty()){
-            return resourceName;
-        }
-        int n = -1;
-        for (ResourcesStorage.Resource report : reports) {
-            if(StringUtils.contains(report.getName(), resources.getSeparator())){
-                String[] s = StringUtils.split(report.getName(), resources.getSeparator());
-                n = Math.max(n, Integer.parseInt(s[0]));
-            } else {
-                n=0;
-            }
-        }
-        
-        if (n < 0) {
-            return resourceName;
-        }
-        
-        n++;
-        return String.valueOf(n) + resources.getSeparator() + resourceName;
-
-        
-    }
-    
-    private String getResourceName(ResourcesStorage resources, String reportName) {
-        try {
-            if (resources != null) {
-                List<ResourcesStorage.Resource> reportsResources = resources.getResources("report");
-                if (reportsResources != null && !reportsResources.isEmpty()) {
-                    for (ResourcesStorage.Resource resource : reportsResources) {
-                        InputStream is = null;
-                        try {
-                            is = resource.asInputStream();
-                            JsonObject json = javax.json.Json.createReader(is).readObject();
-                            String name = json.getString(LayoutReportActionImpl.LAYOUT_REPORT_NAME, null);
-                            if(StringUtils.equalsIgnoreCase(name, reportName)){
-                                return resource.getName();
-                            }
-                        } catch (Exception ex) {
-                            LOGGER.warn("Can't load report form resource (" + resource.getURL() + ")", ex);
-                        } finally {
-                            IOUtils.closeQuietly(is);
-                        }
-                        DisposeUtils.disposeQuietly(resource);
-                    }
-                }
-            }
-        } finally {
-            DisposeUtils.disposeQuietly(resources);
-        }
-        return null;
-    }
-    
-
     private void doChangeReport() {
         LayoutReportAction report = getReportAction();
         if(report == null){
@@ -532,12 +454,14 @@
         } else {
             this.txtIdentifier.setText(report.getReportName());
             this.txtLabel.setText(report.getReportLabel());
-            this.chkCenterToCurrentRow.setSelected(report.isCenterToCurrentRow());
-            this.chkZoomToCurrentRow.setSelected(report.isZoomToCurrentRow());
-            PositiveDoubleDocumentFilter.setValue(this.txtBufferSize,report.getBufferSize());
-            this.chkHighlightRecord.setSelected(report.isHighlightRecord());
-            ListElement.setSelected(this.cboView, report.getViewTag());
-            this.chkUseInternalPdfViewer.setSelected(report.isUseInternalPdfViewer());
+            this.chkCenterToCurrentRow.setSelected(report.getParameters().isCenterToCurrentRow());
+            this.chkZoomToCurrentRow.setSelected(report.getParameters().isZoomToCurrentRow());
+            PositiveDoubleDocumentFilter.setValue(this.txtBufferSize,report.getParameters().getBufferSize());
+            this.chkHighlightRecord.setSelected(report.getParameters().isHighlightRecord());
+            this.highlightSymbol = report.getParameters().getHighlightSymbol(this.source);
+            ListElement.setSelected(this.cboView, report.getParameters().getViewTag());
+            this.chkUseInternalPdfViewer.setSelected(report.getParameters().isUseInternalPdfViewer());
+            this.symbolPicker.set(this.highlightSymbol);
         }
         doUpdateComponents();
     }
@@ -545,6 +469,10 @@
     void setDialog(Dialog dialog) {
         this.dialog = dialog;
     }
+
+    public FeatureStore getStore() {
+        return this.source;
+    }
     
 
     
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayoutParameters.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayoutParameters.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayoutParameters.java	(revision 1608)
@@ -6,6 +6,7 @@
 package org.gvsig.app.extension.reportfromlayout;
 
 import java.io.File;
+import org.gvsig.app.project.documents.layout.report.LayoutReportAction;
 import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.dal.swing.report.ReportAction;
 
@@ -15,9 +16,9 @@
  */
 public interface ExportReportToLayoutParameters {
     
-    public ReportAction getReportAction();
+    public LayoutReportAction getReportAction();
 
-    public void setReportAction(ReportAction report);
+    public void setReportAction(LayoutReportAction report);
 
     public FeatureStore getSource();
 
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayoutParametersImpl.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayoutParametersImpl.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayoutParametersImpl.java	(revision 1608)
@@ -6,16 +6,15 @@
 package org.gvsig.app.extension.reportfromlayout;
 
 import java.io.File;
-import org.gvsig.app.project.documents.layout.LayoutDocument;
+import org.gvsig.app.project.documents.layout.report.LayoutReportAction;
 import org.gvsig.fmap.dal.feature.FeatureStore;
-import org.gvsig.fmap.dal.swing.report.ReportAction;
 
 /**
  *
  * @author fdiaz
  */
 public class ExportReportToLayoutParametersImpl implements ExportReportToLayoutParameters {
-    ReportAction report;
+    LayoutReportAction report;
     FeatureStore source;
     File file;
 
@@ -30,12 +29,12 @@
     }
 
     @Override
-    public ReportAction getReportAction() {
+    public LayoutReportAction getReportAction() {
         return this.report;
     }
 
     @Override
-    public void setReportAction(ReportAction report) {
+    public void setReportAction(LayoutReportAction report) {
         this.report = report;
     }
 
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanelView.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanelView.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanelView.java	(revision 1608)
@@ -41,8 +41,10 @@
    JCheckBox chkZoomToCurrentRow = new JCheckBox();
    JLabel lblBufferSize = new JLabel();
    JTextField txtBufferSize = new JTextField();
+   JCheckBox chkCenterToCurrentRow = new JCheckBox();
+   JLabel lblAppySymbolTo = new JLabel();
+   JComboBox cboApplySymbolTo = new JComboBox();
    JButton btnSelectSymbol = new JButton();
-   JCheckBox chkCenterToCurrentRow = new JCheckBox();
 
    /**
     * Default constructor
@@ -134,7 +136,7 @@
    public JPanel createPanel()
    {
       JPanel jpanel1 = new JPanel();
-      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:22DLU:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
       CellConstraints cc = new CellConstraints();
       jpanel1.setLayout(formlayout1);
 
@@ -203,17 +205,13 @@
       jpanel1.add(chkHighlightRecord,cc.xy(2,16));
 
       jpanel1.add(createPanel1(),cc.xywh(2,20,3,1));
-      btnSelectSymbol.setActionCommand("_Select_symbol");
-      btnSelectSymbol.setName("btnSelectSymbol");
-      btnSelectSymbol.setText("_Select_symbol");
-      jpanel1.add(btnSelectSymbol,new CellConstraints(4,16,1,1,CellConstraints.LEFT,CellConstraints.DEFAULT));
-
       chkCenterToCurrentRow.setActionCommand("_Center_to_current_row");
       chkCenterToCurrentRow.setName("chkCenterToCurrentRow");
       chkCenterToCurrentRow.setText("_Center_to_current_row");
       chkCenterToCurrentRow.setToolTipText("_Center_to_current_row_description");
       jpanel1.add(chkCenterToCurrentRow,cc.xywh(2,18,3,1));
 
+      jpanel1.add(createPanel2(),cc.xy(4,16));
       addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 });
       return jpanel1;
    }
@@ -244,6 +242,30 @@
       return jpanel1;
    }
 
+   public JPanel createPanel2()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:22DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:8DLU:GROW(1.0)","CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      lblAppySymbolTo.setName("lblAppySymbolTo");
+      lblAppySymbolTo.setText("_Apply_symbol");
+      jpanel1.add(lblAppySymbolTo,cc.xy(3,1));
+
+      cboApplySymbolTo.setName("cboApplySymbolTo");
+      jpanel1.add(cboApplySymbolTo,cc.xy(5,1));
+
+      btnSelectSymbol.setActionCommand("...");
+      btnSelectSymbol.setName("btnSelectSymbol");
+      btnSelectSymbol.setText("...");
+      btnSelectSymbol.setToolTipText("_Select_symbol");
+      jpanel1.add(btnSelectSymbol,new CellConstraints(1,1,1,1,CellConstraints.FILL,CellConstraints.FILL));
+
+      addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]);
+      return jpanel1;
+   }
+
    /**
     * Initializer
     */
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutExtension.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutExtension.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutExtension.java	(revision 1608)
@@ -16,6 +16,7 @@
 import org.gvsig.app.project.Project;
 import org.gvsig.app.project.documents.Document;
 import org.gvsig.app.project.documents.layout.LayoutDocument;
+import org.gvsig.app.project.documents.layout.report.LayoutReportActionParameters;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.future.FutureUtils;
 import org.gvsig.tools.i18n.I18nManager;
@@ -78,13 +79,14 @@
                 switch( dialog.getAction()) {
                     case WindowManager_v2.BUTTON_OK:
                         dialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, false);                        
-                        ConfigureReportFromLayoutParameters params = new ConfigureReportFromLayoutParametersImpl();
+                        LayoutReportActionParameters params = LayoutReportActionParameters.create();
                         panel.fetch(params);
-                        if(panel.doConfigureReportFromLayout(params)){
+                        if(panel.doConfigureReportFromLayout(params, panel.getLayoutDocument(), panel.getStore())){
                             ((JComponent)dialog).setVisible(false);
-                        };
+                        }
                         break;
 
+
                     case WindowManager_v2.BUTTON_CANCEL:
                         ((JComponent)dialog).setVisible(false);
                         break;
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanel.xml
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanel.xml	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanel.xml	(revision 1608)
@@ -27,7 +27,7 @@
    <at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanel.xml</at>
    <at name="path">projects/gvSIG/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ConfigureReportFromLayoutPanel.xml</at>
    <at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
-   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at>
+   <at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:22DLU:GROW(1.0),FILL:4DLU:NONE</at>
    <at name="components">
     <object classname="java.util.LinkedList">
      <item >
@@ -377,7 +377,7 @@
             </at>
             <at name="actionCommand">_Center_to_current_row</at>
             <at name="name">chkUseInternalPdfViewer</at>
-            <at name="width">1183</at>
+            <at name="width">1097</at>
             <at name="text">_Use_internal_pdf_viewer</at>
             <at name="toolTipText">_Use_internal_pdf_viewer_description</at>
             <at name="height">22</at>
@@ -433,7 +433,7 @@
              </object>
             </at>
             <at name="name">cboLayout</at>
-            <at name="width">1021</at>
+            <at name="width">935</at>
             <at name="items">
              <object classname="com.jeta.forms.store.properties.ItemsProperty">
               <at name="name">items</at>
@@ -494,7 +494,7 @@
             <at name="scrollableTracksViewportHeight">true</at>
             <at name="scrollableTracksViewportWidth">true</at>
             <at name="name">treeSource</at>
-            <at name="width">1019</at>
+            <at name="width">933</at>
             <at name="rowCount">3</at>
             <at name="scollBars">
              <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
@@ -524,7 +524,7 @@
              </object>
             </at>
             <at name="rootVisible">false</at>
-            <at name="height">504</at>
+            <at name="height">476</at>
            </object>
           </at>
          </object>
@@ -577,7 +577,7 @@
              </object>
             </at>
             <at name="name">cboReport</at>
-            <at name="width">1021</at>
+            <at name="width">935</at>
             <at name="items">
              <object classname="com.jeta.forms.store.properties.ItemsProperty">
               <at name="name">items</at>
@@ -636,7 +636,7 @@
              </object>
             </at>
             <at name="name">txtIdentifier</at>
-            <at name="width">1021</at>
+            <at name="width">935</at>
             <at name="height">21</at>
            </object>
           </at>
@@ -690,7 +690,7 @@
              </object>
             </at>
             <at name="name">txtLabel</at>
-            <at name="width">1021</at>
+            <at name="width">935</at>
             <at name="height">21</at>
            </object>
           </at>
@@ -744,7 +744,7 @@
              </object>
             </at>
             <at name="name">lblViewSeparator</at>
-            <at name="width">1183</at>
+            <at name="width">1097</at>
             <at name="text">_View</at>
             <at name="height">17</at>
            </object>
@@ -859,7 +859,7 @@
              </object>
             </at>
             <at name="name">cboView</at>
-            <at name="width">1021</at>
+            <at name="width">935</at>
             <at name="items">
              <object classname="com.jeta.forms.store.properties.ItemsProperty">
               <at name="name">items</at>
@@ -947,7 +947,7 @@
          </at>
          <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
         </super>
-        <at name="id">embedded.900460273</at>
+        <at name="id">embedded.297351574</at>
         <at name="rowspecs">CENTER:DEFAULT:NONE</at>
         <at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)</at>
         <at name="components">
@@ -1115,7 +1115,7 @@
                   </object>
                  </at>
                  <at name="name">txtBufferSize</at>
-                 <at name="width">878</at>
+                 <at name="width">792</at>
                  <at name="toolTipText">_Buffer_size_description</at>
                  <at name="height">21</at>
                 </object>
@@ -1142,7 +1142,7 @@
               </at>
              </object>
             </at>
-            <at name="name"></at>
+            <at name="name"/>
             <at name="fill">
              <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
               <at name="name">fill</at>
@@ -1213,11 +1213,11 @@
         <super classname="com.jeta.forms.store.memento.ComponentMemento">
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
-           <at name="column">4</at>
-           <at name="row">16</at>
-           <at name="colspan">1</at>
+           <at name="column">2</at>
+           <at name="row">18</at>
+           <at name="colspan">3</at>
            <at name="rowspan">1</at>
-           <at name="halign">left</at>
+           <at name="halign">default</at>
            <at name="valign">default</at>
            <at name="insets" object="insets">0,0,0,0</at>
           </object>
@@ -1225,10 +1225,10 @@
          <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
         </super>
         <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
-        <at name="beanclass">javax.swing.JButton</at>
+        <at name="beanclass">javax.swing.JCheckBox</at>
         <at name="beanproperties">
          <object classname="com.jeta.forms.store.memento.PropertiesMemento">
-          <at name="classname">javax.swing.JButton</at>
+          <at name="classname">javax.swing.JCheckBox</at>
           <at name="properties">
            <object classname="com.jeta.forms.store.support.PropertyMap">
             <at name="border">
@@ -1251,10 +1251,11 @@
               </at>
              </object>
             </at>
-            <at name="actionCommand">_Select_symbol</at>
-            <at name="name">btnSelectSymbol</at>
-            <at name="width">113</at>
-            <at name="text">_Select_symbol</at>
+            <at name="actionCommand">_Center_to_current_row</at>
+            <at name="name">chkCenterToCurrentRow</at>
+            <at name="width">1097</at>
+            <at name="text">_Center_to_current_row</at>
+            <at name="toolTipText">_Center_to_current_row_description</at>
             <at name="height">22</at>
            </object>
           </at>
@@ -1265,26 +1266,207 @@
      </item>
      <item >
       <at name="value">
-       <object classname="com.jeta.forms.store.memento.BeanMemento">
+       <object classname="com.jeta.forms.store.memento.FormMemento">
         <super classname="com.jeta.forms.store.memento.ComponentMemento">
          <at name="cellconstraints">
           <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
-           <at name="column">2</at>
-           <at name="row">18</at>
-           <at name="colspan">3</at>
+           <at name="column">4</at>
+           <at name="row">16</at>
+           <at name="colspan">1</at>
            <at name="rowspan">1</at>
            <at name="halign">default</at>
            <at name="valign">default</at>
            <at name="insets" object="insets">0,0,0,0</at>
           </object>
          </at>
-         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+         <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
         </super>
-        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
-        <at name="beanclass">javax.swing.JCheckBox</at>
-        <at name="beanproperties">
+        <at name="id">embedded.O757869dfK1892a33c9fbKK7fff</at>
+        <at name="rowspecs">CENTER:DEFAULT:NONE</at>
+        <at name="colspecs">FILL:22DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:8DLU:GROW(1.0)</at>
+        <at name="components">
+         <object classname="java.util.LinkedList">
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">3</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">lblAppySymbolTo</at>
+                 <at name="width">101</at>
+                 <at name="text">_Apply_symbol</at>
+                 <at name="fill">
+                  <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+                   <at name="name">fill</at>
+                  </object>
+                 </at>
+                 <at name="height">17</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">5</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">default</at>
+                <at name="valign">default</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JComboBox</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JComboBox</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="name">cboApplySymbolTo</at>
+                 <at name="width">765</at>
+                 <at name="items">
+                  <object classname="com.jeta.forms.store.properties.ItemsProperty">
+                   <at name="name">items</at>
+                  </object>
+                 </at>
+                 <at name="height">23</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+          <item >
+           <at name="value">
+            <object classname="com.jeta.forms.store.memento.BeanMemento">
+             <super classname="com.jeta.forms.store.memento.ComponentMemento">
+              <at name="cellconstraints">
+               <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+                <at name="column">1</at>
+                <at name="row">1</at>
+                <at name="colspan">1</at>
+                <at name="rowspan">1</at>
+                <at name="halign">fill</at>
+                <at name="valign">fill</at>
+                <at name="insets" object="insets">0,0,0,0</at>
+               </object>
+              </at>
+              <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+             </super>
+             <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+             <at name="beanclass">javax.swing.JButton</at>
+             <at name="beanproperties">
+              <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+               <at name="classname">javax.swing.JButton</at>
+               <at name="properties">
+                <object classname="com.jeta.forms.store.support.PropertyMap">
+                 <at name="border">
+                  <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                   <at name="borders">
+                    <object classname="java.util.LinkedList">
+                     <item >
+                      <at name="value">
+                       <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                        <super classname="com.jeta.forms.store.properties.BorderProperty">
+                         <at name="name">border</at>
+                        </super>
+                       </object>
+                      </at>
+                     </item>
+                    </object>
+                   </at>
+                  </object>
+                 </at>
+                 <at name="actionCommand">...</at>
+                 <at name="name">btnSelectSymbol</at>
+                 <at name="width">40</at>
+                 <at name="text">...</at>
+                 <at name="toolTipText">_Select_symbol</at>
+                 <at name="height">23</at>
+                </object>
+               </at>
+              </object>
+             </at>
+            </object>
+           </at>
+          </item>
+         </object>
+        </at>
+        <at name="properties">
          <object classname="com.jeta.forms.store.memento.PropertiesMemento">
-          <at name="classname">javax.swing.JCheckBox</at>
+          <at name="classname">com.jeta.forms.gui.form.GridView</at>
           <at name="properties">
            <object classname="com.jeta.forms.store.support.PropertyMap">
             <at name="border">
@@ -1293,30 +1475,52 @@
                <at name="name">border</at>
               </super>
               <at name="borders">
-               <object classname="java.util.LinkedList">
-                <item >
-                 <at name="value">
-                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
-                   <super classname="com.jeta.forms.store.properties.BorderProperty">
-                    <at name="name">border</at>
-                   </super>
-                  </object>
-                 </at>
-                </item>
-               </object>
+               <object classname="java.util.LinkedList"/>
               </at>
              </object>
             </at>
-            <at name="actionCommand">_Center_to_current_row</at>
-            <at name="name">chkCenterToCurrentRow</at>
-            <at name="width">1183</at>
-            <at name="text">_Center_to_current_row</at>
-            <at name="toolTipText">_Center_to_current_row_description</at>
-            <at name="height">22</at>
+            <at name="name"></at>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">21</at>
+              <at name="horizontalpolicy">31</at>
+             </object>
+            </at>
            </object>
           </at>
          </object>
         </at>
+        <at name="cellpainters">
+         <object classname="com.jeta.forms.store.support.Matrix">
+          <at name="rows">
+           <object classname="[Ljava.lang.Object;" size="1">
+            <at name="item" index="0">
+             <object classname="[Ljava.lang.Object;" size="5"/>
+            </at>
+           </object>
+          </at>
+         </object>
+        </at>
+        <at name="rowgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
+        <at name="colgroups">
+         <object classname="com.jeta.forms.store.memento.FormGroupSet">
+          <at name="groups">
+           <object classname="java.util.HashMap"/>
+          </at>
+         </object>
+        </at>
        </object>
       </at>
      </item>
Index: trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayout.java
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayout.java	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/reportfromlayout/ExportReportToLayout.java	(revision 1608)
@@ -9,7 +9,6 @@
 import java.awt.event.ActionEvent;
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.InputStream;
 import java.util.List;
 import java.util.function.Predicate;
 import javax.json.JsonObject;
@@ -19,10 +18,9 @@
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.TreeSelectionEvent;
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.StringUtils;
 import org.gvsig.app.ApplicationLocator;
 import org.gvsig.app.project.documents.layout.LayoutManager;
-import org.gvsig.app.project.documents.layout.report.LayoutReportActionImpl;
+import org.gvsig.app.project.documents.layout.report.LayoutReportAction;
 import org.gvsig.app.project.documents.layout.report.LayoutReportActionFactory;
 import org.gvsig.fmap.dal.feature.FeatureStore;
 import org.gvsig.fmap.dal.swing.DALSwingLocator;
@@ -30,7 +28,6 @@
 import org.gvsig.fmap.dal.swing.report.ReportAction;
 import org.gvsig.fmap.dal.swing.storesrepository.StoresRepositoryController;
 import org.gvsig.i18n.Messages;
-import org.gvsig.json.Json;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dispose.DisposeUtils;
 import org.gvsig.tools.i18n.I18nManager;
@@ -144,60 +141,27 @@
     
     private void fillCboReport() {
         DataSwingManager dataSwingManager = DALSwingLocator.getDataSwingManager();
-        DefaultComboBoxModel<LabeledValue<ReportAction>> model = new DefaultComboBoxModel();
+        DefaultComboBoxModel<LabeledValue<LayoutReportAction>> model = new DefaultComboBoxModel();
         if(this.source == null) {
             this.cboReport.setModel(model);
             return;
         }
-        List<ReportAction> reports = dataSwingManager.getReportActions(source, (Predicate<JsonObject>) (JsonObject t) -> LayoutReportActionFactory.isJsonApplicable(t));
+        List<ReportAction> reports = dataSwingManager.getReportActions(
+                source, 
+                (Predicate<JsonObject>) (JsonObject t) -> LayoutReportActionFactory.isJsonApplicable(t)
+        );
         
         for (ReportAction report : reports) {
-            model.addElement(new LabeledValueImpl<>(report.getReportLabel(), report));
+            model.addElement(new LabeledValueImpl<>(report.getReportLabel(), (LayoutReportAction)report));
         }
         cboReport.setModel(model);
 
     }
   
-//    List<Document> getLayouts() {
-//
-//        List<Document> layouts = ApplicationLocator.getProjectManager().getCurrentProject().getDocuments(LayoutDocument.class);
-//
-//        return layouts;
-//
-//    }
-
-
-    
-//    private void fillCboLayout() {
-//        DefaultComboBoxModel<LabeledValue<LayoutDocument>> model = new DefaultComboBoxModel();
-//        List<Document> layouts = getLayouts();
-//        
-//        if(layouts.size() > 1){
-//            Collections.sort(layouts, new CompareUtils.NullSafeComparator<Document>() {
-//                @Override
-//                public int safeCompare(Document o1, Document o2) {
-//                    return StringUtils.compare(o1.getName(), o2.getName());
-//                }
-//            });
-//        }
-//        
-//        for (Document layout : layouts) {
-//            if(layout instanceof LayoutDocument){
-//                model.addElement(new LabeledValueImpl<>(layout.getName(), (LayoutDocument)layout));
-//            }
-//        }
-//        cboLayout.setModel(model);
-//
-//    }
-    
-    private ReportAction getReportAction(){
-        return (ReportAction) ((LabeledValue)cboReport.getSelectedItem()).getValue();
+    private LayoutReportAction getReportAction(){
+        return (LayoutReportAction) ((LabeledValue)cboReport.getSelectedItem()).getValue();
     }
     
-//    private LayoutDocument getLayoutDocument(){
-//        return (LayoutDocument) ((LabeledValue)cboLayout.getSelectedItem()).getValue();
-//    }
-    
     public void fetch(ExportReportToLayoutParameters params){
         params.setSource(this.source);
         params.setReportAction(this.getReportAction());
@@ -206,7 +170,7 @@
 
     public boolean doExportReportToLayout(ExportReportToLayoutParameters params) {
         FeatureStore source = params.getSource();
-        ReportAction report = params.getReportAction();
+        LayoutReportAction report = params.getReportAction();
         File file = params.getFile();
         ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager();
         I18nManager i18n = ToolsLocator.getI18nManager();
@@ -244,53 +208,15 @@
         
     }
     
-    public boolean doExportReportToLayout(FeatureStore store, ReportAction report, File templateFile) {
+    public boolean doExportReportToLayout(FeatureStore store, LayoutReportAction report, File templateFile) {
         
-
-        ResourcesStorage.Resource resourceReport = null;
         ResourcesStorage.Resource resourceLayout = null;
         FileOutputStream templateOs = null;
         ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager();
         I18nManager i18n = ToolsLocator.getI18nManager();
         try {
-            ResourcesStorage resources = store.getResourcesStorage();
-
-            String resourceReportName = getResourceName(resources, report.getReportName());
-            if (resourceReportName == null) {
-                dialogs.messageDialog(
-                        i18n.getTranslation("_Cant_find_resource_XreportnameX",
-                                new String[]{
-						resourceReportName,
-					}
-                        ),
-                        null,
-                        i18n.getTranslation("_Export_report_to_layout"),
-                        JOptionPane.WARNING_MESSAGE);
-                return false;
-            }
+            resourceLayout = report.getTemplateAsResource();
             
-            resourceReport = resources.getResource(resourceReportName);
-            
-            JsonObject jsonReport = Json.createObject(resourceReport.asInputStream());
-            
-            String templateName = jsonReport.getString(LayoutReportActionImpl.LAYOUT_REPORT_TEMPLATE_NAME, LayoutReportActionImpl.LAYOUT_REPORT_DEFAULT_TEMPLATE_NAME);
-            
-            if(StringUtils.isBlank(templateName)){
-                
-                dialogs.messageDialog(
-                        i18n.getTranslation("_Template_name_is_blank"//,
-//                                new String[]{
-//						resourceReportName,
-//					}
-                        ),
-                        null,
-                        i18n.getTranslation("_Export_report_to_layout"),
-                        JOptionPane.WARNING_MESSAGE);
-                return false;
-            }
-            
-            resourceLayout = resources.getResource(templateName);
-            
             if (!(templateFile.getPath().toLowerCase().endsWith(LayoutManager.TEMPLATE_FILE_POINTEXT.toLowerCase()))) {
                 templateFile = new File(templateFile.getPath() + LayoutManager.TEMPLATE_FILE_POINTEXT);
             }
@@ -308,70 +234,13 @@
             return false;
         } finally {
             IOUtils.closeQuietly(templateOs);
-            IOUtils.closeQuietly(resourceReport);
             IOUtils.closeQuietly(resourceLayout);
         }
         
-        
     }
     
-//    private String getNextResourceName(ResourcesStorage resources, String resourceName){
-//        List<ResourcesStorage.Resource> reports = resources.getResources(resourceName);
-//        if(reports == null || reports.isEmpty()){
-//            return resourceName;
-//        }
-//        int n = -1;
-//        for (ResourcesStorage.Resource report : reports) {
-//            if(StringUtils.contains(report.getName(), resources.getSeparator())){
-//                String[] s = StringUtils.split(report.getName(), resources.getSeparator());
-//                n = Math.max(n, Integer.parseInt(s[0]));
-//            } else {
-//                n=0;
-//            }
-//        }
-//        
-//        if (n < 0) {
-//            return resourceName;
-//        }
-//        
-//        n++;
-//        return String.valueOf(n) + resources.getSeparator() + resourceName;
-//
-//        
-//    }
-//    
-    private String getResourceName(ResourcesStorage resources, String reportName) {
-        try {
-            if (resources != null) {
-                List<ResourcesStorage.Resource> reportsResources = resources.getResources("report");
-                if (reportsResources != null && !reportsResources.isEmpty()) {
-                    for (ResourcesStorage.Resource resource : reportsResources) {
-                        InputStream is = null;
-                        try {
-                            is = resource.asInputStream();
-                            JsonObject json = javax.json.Json.createReader(is).readObject();
-                            String name = json.getString(LayoutReportActionImpl.LAYOUT_REPORT_NAME, null);
-                            if(StringUtils.equalsIgnoreCase(name, reportName)){
-                                return resource.getName();
-                            }
-                        } catch (Exception ex) {
-                            LOGGER.warn("Can't load report form resource (" + resource.getURL() + ")", ex);
-                        } finally {
-                            IOUtils.closeQuietly(is);
-                        }
-                        DisposeUtils.disposeQuietly(resource);
-                    }
-                }
-            }
-        } finally {
-            DisposeUtils.disposeQuietly(resources);
-        }
-        return null;
-    }
-    
-
     private void doChangeReport() {
-        ReportAction report = getReportAction();
+//        ReportAction report = getReportAction();
         this.pickerFile.set(null);
 //        if(report == null){
 //            this.txtIdentifier.setText("");
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 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text.properties	(revision 1608)
@@ -85,4 +85,7 @@
 _Highlight_record=Resaltar registro
 _Line_color=Color de la linea
 _Transparency=Transparencia
-_Select_symbol=Seleccionar s\u00edmbolo
\ No newline at end of file
+_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
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 1607)
+++ trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties	(revision 1608)
@@ -85,4 +85,7 @@
 _Highlight_record=Highlight record
 _Line_color=Line color
 _Transparency=Transparency
-_Select_symbol=Select symbol
\ No newline at end of file
+_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
Index: trunk/org.gvsig.app.document.layout2.app/pom.xml
===================================================================
--- trunk/org.gvsig.app.document.layout2.app/pom.xml	(revision 1607)
+++ trunk/org.gvsig.app.document.layout2.app/pom.xml	(revision 1608)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.gvsig</groupId>
         <artifactId>org.gvsig.desktop</artifactId>
-        <version>2.0.424</version>
+        <version>2.0.425-SNAPSHOT</version>
     </parent>
 
 	<url>https://devel.gvsig.org/redmine/projects/gvsig-app-document-layout</url>
