Calculated Measures

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

Moderator: Alex Zencovich

Calculated Measures

Postby jarzeg » Tue Jul 11, 2006 11:34 am

Hello,

how to add calculated measure by Pascal code?

Best regards

Grzegorz
jarzeg
User
 
Posts: 6
Joined: Tue Jul 11, 2006 11:33 am

Postby AlexZencovich » Tue Jul 11, 2006 11:38 am

Use procedure
PivotMap.AddCalculatedMeasure(Name,Formula : string);

call PivotMap.RefreshData(True) after all.
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 jarzeg » Tue Jul 11, 2006 11:59 am

Hello,

on

PivotMap1.AddCalculatedMeasure(MyName,MyFormula);

i have under debuger: "Project MyProject.exe raised exception class EOleException with message 'Catastrophic error' "

I'm using version 7.3.1.57
jarzeg
User
 
Posts: 6
Joined: Tue Jul 11, 2006 11:33 am

Postby AlexZencovich » Tue Jul 11, 2006 12:12 pm

Was PivotMap active when you try to add measure? It must be active.
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 jarzeg » Tue Jul 11, 2006 1:21 pm

Thanx

it was it,

Best regards

Grzegorz
jarzeg
User
 
Posts: 6
Joined: Tue Jul 11, 2006 11:33 am

Postby jarzeg » Tue Jul 11, 2006 3:01 pm

Hello once again,

how to by Pascal code to change CalcType for calculated measure?

Best regards

Grzegorz
jarzeg
User
 
Posts: 6
Joined: Tue Jul 11, 2006 11:33 am

Postby AlexZencovich » Tue Jul 11, 2006 4:02 pm

Calc. measure does not have CalcType. It calulated by provided formula.
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 jarzeg » Tue Jul 11, 2006 7:51 pm

Hi,

I have thought, that it is possible because in Measure manager Calculation type is available for calculated measures too.

Best regards

Grzegorz
jarzeg
User
 
Posts: 6
Joined: Tue Jul 11, 2006 11:33 am

Postby AlexZencovich » Tue Jul 11, 2006 8:00 pm

Yes, because it is common form. But actually it will did nothing for calc. measures.
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 12 guests

cron