GridCube

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

Moderator: Alex Zencovich

GridCube

Postby José Luiz » Wed Nov 26, 2008 9:02 pm

Hi,

My user`s add formula in execution time, i need the comand Loop (While/ For) at GRidCube return value cell the column 0.
At component in form (Cube) exist measure 0,1,2,3,4 .

because, i need teste the value of column 0 at grid to:

if Value > 200 (for exemple) Then
showmessage('Ok, value grand')
else if
value > 400 Then
showmessage('Not Ok')
else
showmessage('Value not range');

But see:
measure(0) at Cube <> column(0) at Grid.

Tanks
José Luiz
User
 
Posts: 15
Joined: Wed Nov 26, 2008 8:52 pm

Re: GridCube

Postby AlexZencovich » Thu Nov 27, 2008 5:53 am

I think you need in
PivotMap.Cells[Column: Integer; Row: Integer; Measure: Integer; View : TMeasureViewType]: Double;
or
PivotMap.ColumnTotal[Column: Integer; Measure: Integer; View : TMeasureViewType]: Double;
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

Re: GridCube

Postby José Luiz » Thu Nov 27, 2008 4:29 pm

Hi, tanks But

see:

PivotMap.Cells[Column: Integer; Row: Integer; Measure: Integer; View : TMeasureViewType]: Double;

This comand at lop rigth ?
see.
For i:= 0 to 10 do //for exemple)
showmessage( FloattoStr(PivotMap.Cells[0,i,0,0]));

At message aways show the values of measureindex(0) of PivotCube, and the measure contains at MeasureToolBar right ?

but my user add at formula, for exemple
begin
Result = vl_total * qt_item
end

And this formula (name is... "testing") contains at MeasureToolBar in index 6 for exemple...

If i change de measure index 6 at measureToolbar for index 0 this comand

For i:= 0 to 10 do //for exemple)
showmessage( FloattoStr(PivotMap.Cells[0,i,0,0]));

the value show at measureindex (0) at pivotcube and not measureindex(0) at MeasureToolBar

I need aways show me at (messagebox for exemple) the index(0) of MeasuretoolBar.

Sorry if i not write correctly my question....


Best regards
José Luiz
User
 
Posts: 15
Joined: Wed Nov 26, 2008 8:52 pm

Re: GridCube

Postby AlexZencovich » Thu Nov 27, 2008 7:31 pm

If you will look at TPivotMap.Measures[] : TMapMeasure;

TMap Measure has 2 properties
VisualIndex
RealIndex

VisualIndex is index in visual appearance (toolbar or grid) and RealIndex is actual index of measure in cube and cannot be changed till cube not rebuild. Try to play with these properties to get right measure
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

Re: GridCube

Postby José Luiz » Thu Nov 27, 2008 9:07 pm

Hi,

Tanks the solution is perfect.

Now i develeopment the comand, tanks you help.
José Luiz
User
 
Posts: 15
Joined: Wed Nov 26, 2008 8:52 pm


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron