Difference between revisions of "Calc/Features/DataPilot drill-down on data field"

From Apache OpenOffice Wiki
< Calc‎ | Features
Jump to: navigation, search
(Description: added more text.)
(modified & added API.)
Line 7: Line 7:
  
 
This functionality introduces the following new API.
 
This functionality introduces the following new API.
 +
 +
<code>[cpp,N]
 +
module com {  module sun {  module star {  module sheet {
 +
 +
interface XDataPilotTable2: com::sun::star::sheet::XDataPilotTable
 +
{
 +
    sequence< sequence< any > > getDrillDownData( [in] com::sun::star::table::CellAddress aAddr );
 +
};
 +
 +
}; }; }; };
 +
</code>
  
 
<code>[cpp,N]
 
<code>[cpp,N]
Line 13: Line 24:
 
interface XDrillDownDataSupplier: com::sun::star::uno::XInterface
 
interface XDrillDownDataSupplier: com::sun::star::uno::XInterface
 
{
 
{
     void getDrillDownData( [in] sequence< com::sun::star::sheet::DataPilotFieldFilter > aFilters,
+
     sequence< sequence< any > > getDrillDownData(  
                          [out] sequence< sequence< any > > rData );
+
        [in] sequence< com::sun::star::sheet::DataPilotFieldFilter > aFilters );
 
};
 
};
  
Line 35: Line 46:
 
</code>
 
</code>
  
The '''com.sun.star.sheet.DataPilotSource''' service is expected to support '''XDrillDownDataSupplier''' interface, to provide a 2-dimensional array data consisting of a subset of the original data source table that satisfies a given set of filtering criteria.  A sequence of '''DataPilotFieldFilter''' provides desired filtering criteria to '''XDrillDownDataSupplier::getDrillDownData()''' method.
+
The ''com.sun.star.sheet.DataPilotSource'' service will support the ''XDrillDownDataSupplier'' interface to provide a 2-dimensional array data consisting of a subset of the original data source table that satisfies a given set of filtering criteria.  A sequence of ''DataPilotFieldFilter'' provides desired filtering criteria to ''getDrillDownData()'' method.  This interface is intended for an external UNO package so that it can overwrite the interface to provide constituent rows when requested.
  
TODO: Add another method that takes a cell address instead of a sequence of filters.
+
The interface ''com.sun.star.sheet.XDataPilotTable2'' extends the existing ''com.sun.star.sheet.XDataPilotTable'' interface to provide additional method ''getDrillDownData()'' so that the client code can obtain constituent rows from the data pilot table.
  
 
[[Category:Calc|Features/DataPilot drill-down on data field]]
 
[[Category:Calc|Features/DataPilot drill-down on data field]]
 
[[Category:Feature|DataPilot drill-down on data field]]
 
[[Category:Feature|DataPilot drill-down on data field]]

Revision as of 21:33, 26 October 2007

Description

When a cell within the data field is double-clicked, it inserts a new sheet containing a subset of rows from the original data source that constitutes the result data displayed in that cell. For instance, when the data field function is selected to be SUM, then the number that is shown in the data field cell must be identical to the sum of all the data field values in the constituent rows displayed in the inserted sheet.

The area that can provide a drill-down sheet spans from the top-left cell in the data field to the bottom-right corner of the data pilot output, including the Total Result row and column. When the cell being double-clicked contains no constituent rows, then no new sheet will be inserted.

API Change

This functionality introduces the following new API.

[cpp,N] module com { module sun { module star { module sheet {

interface XDataPilotTable2: com::sun::star::sheet::XDataPilotTable {

   sequence< sequence< any > > getDrillDownData( [in] com::sun::star::table::CellAddress aAddr );

};

}; }; }; };

[cpp,N] module com { module sun { module star { module sheet {

interface XDrillDownDataSupplier: com::sun::star::uno::XInterface {

   sequence< sequence< any > > getDrillDownData( 
       [in] sequence< com::sun::star::sheet::DataPilotFieldFilter > aFilters );

};

}; }; }; };

[cpp,N] module com { module sun { module star { module sheet {

struct DataPilotFieldFilter {

   /** Field name. */
   string FieldName;
   /** String value that needs to match against. */
   string MatchValue;

};

}; }; }; };

The com.sun.star.sheet.DataPilotSource service will support the XDrillDownDataSupplier interface to provide a 2-dimensional array data consisting of a subset of the original data source table that satisfies a given set of filtering criteria. A sequence of DataPilotFieldFilter provides desired filtering criteria to getDrillDownData() method. This interface is intended for an external UNO package so that it can overwrite the interface to provide constituent rows when requested.

The interface com.sun.star.sheet.XDataPilotTable2 extends the existing com.sun.star.sheet.XDataPilotTable interface to provide additional method getDrillDownData() so that the client code can obtain constituent rows from the data pilot table.

Personal tools