Where to add a call to addcaculatedMeasure

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

Moderator: Alex Zencovich

Where to add a call to addcaculatedMeasure

Postby dophin » Sun Aug 19, 2007 8:04 pm

Hello, Alex

because I cannot figure out how to do it easier, I'm trying to
add a calculated measure to a map in runtime, without user interaction :

I'm considering insering the following code :

if ( pivotMap1.MeasureByName[ 'Taux' ] = nil ) then
begin
pivotMap1.AddCalculatedMeasure( 'Taux', 'result="MODULEVALIDE"*100/ ("MODULEOBLIGATOIRE")') ;
end;

Is this OK ?
in which event handler must I insert the above code ?
Will this calculated measure be taken in account immediately ?

TIA

Joseph Osende
dophin
Developer
 
Posts: 33
Joined: Fri Jun 15, 2007 12:35 am

Postby AlexZencovich » Mon Aug 20, 2007 3:06 am

1. TPivotCube.OnAfterBuild/onAfterLoad
2. You should call PivotMap.RefreshData(True) to apply changes. You may call it once after all changes you made, except case when your calc. measures call each other
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

Postby dophin » Mon Aug 20, 2007 6:05 am

Thank you very much.

It's ok, i've read another your to
another customer's post during the
night.

Thank you

Is it possble to quickly download
all the posts to the forums for
quick reference ?
dophin
Developer
 
Posts: 33
Joined: Fri Jun 15, 2007 12:35 am

Postby AlexZencovich » Mon Aug 20, 2007 7:25 am

dophin wrote:Is it possble to quickly download
all the posts to the forums for
quick reference ?


There is search procedure. I think it should help :)

How to download entire forum - I have no idea, I'm not forum software developer :)
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 2 guests

cron