get list of subcells

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

get list of subcells

Postby smithj » Mon Jul 23, 2007 6:59 am

Hi!

How could I get a list of subcells of some map cell?
I.e. I need a list of previous level cells, not a list of simple facts, or some measure values.

On screenshots below I marked which subcells I'd like to get for two subtotal cells:

Image

Image
smithj
Guest
 
Posts: 1
Joined: Fri Jul 20, 2007 4:57 pm

Postby AlexZencovich » Mon Jul 23, 2007 8:33 am

There are 2 types of subcells - children(childs) and leafs. Difference is - child subcells related to another dimension but leafs - related to same dimension by hierarchy.

You may explore all cells by 2 ways

TPivotMap.TopRows/TopColumns then scroll by

var
cell,subcell : ICell;
begin
// scroll topmost dimension cells
for i := 0 to PivotMap.TopRows.ChildCount - 1 do
begin
cell := PivotMap.TopRows.Childs[i]
// scroll leafs if available
for j := 0 to cell.LeafCount - 1 do
subcell := cell.Leafs[j]
// scroll second dimension cells
for j := 0 to cell.ChildCount - 1 do
subcell := cell.Childs[j]
end;
end;
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 1 guest

cron