Sort Descending

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

Moderator: Alex Zencovich

Sort Descending

Postby Nasguone » Thu Apr 26, 2007 2:43 pm

I do not obtain to command mine grid of descending form. I tried the following function:


procedure TfrmPrincipal.SpeedButton1Click(Sender: TObject);
var
i : integer;
d : TMapDimension;

begin
d := nil;
for I := 0 to dm.pvmPdasMot.DimensionCount - 1 do
if dm.pvmPdasMot.Dimensions[i].AliasName = 'Categoria' then
begin
d := dm.pvmPdasMot.Dimensions[i];
Break;
end;
d.DefaultSort := ddsSortByKeyD;
dm.pvmPdasMot.RefreshData;

end;

to put did not give certain.

The Grid still continues commanding wrong:
Categoria
5
3
1
4
2

The correct one would be to command thus:
Categoria
5
4
3
2
1
Nasguone
Guest
 
Posts: 3
Joined: Wed Apr 25, 2007 8:44 pm

Postby AlexZencovich » Thu Apr 26, 2007 3:14 pm

1. Is it correctly sorted in embedded dimension editor?

2. There only one difference with internally used code I can see - it should be

dm.pvmPdasMot.RefreshData(True)
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: Google [Bot] and 4 guests

cron