Problem with delphi2007

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

Moderator: Alex Zencovich

Problem with delphi2007

Postby prosoft » Wed Nov 28, 2007 11:32 pm

I have application on DELPHI 6 an pivotcube vcl two years old and it works corectly. Now i bought update to delphi 2007 and assign my application to them.

when i compile it on DELPHI 2007 it doesnt work.
Problem is that pivogrid is empty when i run it. Any dimenzions arent loaded. pivotmap.DimensionCount=0

I have DBF datasources.
I crete DIM
ADimensionItem:=pvCube.Dimensions.Add;
ADimensionItem.DataSet:=adodsCache;
ADimensionItem.AliasName:=APol;
ADimensionItem.FieldName:=APol;
ADimensionItem.DisplayName:=ANaz;
ADimensionItem.DataSet:=adodsCache;
ADimensionItem.Sorting:=dmtKeySort;
if FXmlParser.CurName='DIMZ' then
AMapDimension:=pvMap.Rows.Add
else if FXmlParser.CurName='DIMX' then
AMapDimension:=pvMap.Columns.Add;
AMapDimension.Name:=APol;
AMapDimension.DisplayName:=ANaz;
and Measure

AMeasureItem:=pvCube.Measures.Add;
AMeasureItem.DataType:=ftFloat;
AMeasureItem.FieldName:=APol;
AMeasureItem.CalcType:=ACalcType;
AMeasureItem.AliasName:=ANaz;
AMeasureItem.FormatString:='#,##0.00';

and when i do

pivotgrid.Activate:=true
in delphi 6 appears pvMap.DimensionCount on required value
in delphi 2007 pvMap.DimensionCount=0 and it error.

What can be wrong?

Can you help me?
Thankls Josef.
prosoft
User
 
Posts: 14
Joined: Tue Nov 27, 2007 3:35 pm

Postby AlexZencovich » Thu Nov 29, 2007 5:48 am

At least there should be

PivotCube.Active := True

instead of

PivotGrid.Activate := True;

(I suppose there just error in forum message because that code should not be compiled TPivotGrid does not have property Activate)

But, check if PivotMap.Active is True after you build cube. If not - set it to 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

Problem with delphi2007

Postby prosoft » Thu Nov 29, 2007 7:23 am

Thanks,
your answer help me to idetificate problem

in PIVOTMAP_SRC unit in TPivotMap.SetActive procedure i have to comment 2 lines (access violation appears).


first offset is 3273

for i := 0 to FCube.Intf.MeasureCount - 1 do
begin
mm := TMapMeasure.Create(self);
mm.SyncNames;
mm.AliasName := FCube.Intf.Measure[i].AliasName;
//**** error mm.DisplayName := FCube.Intf.Measure[i].DisplayName;
mm.FieldName := FCube.Intf.Measure[i].FieldName;


and

second offset is 3307

for i := 0 to FCube.Intf.DimensionCount - 1 do
begin
dim := FCube.Intf.Dimension[i];
md := TMapDimension.Create;
md.FMap := Self;
md.FAliasName := dim.Alias;
md.FFieldName := dim.FieldName;
md.FDisplayName := dim.DisplayName;
md.ForecastingType := dim.ForecastingType;
if dim.PrecedingName <> '' then
md.PrecedingName := dim.PrecedingName;
if dim.FollowingName <> '' then
md.FollowingName := dim.FollowingName;
md.CaptionFormat := dim.CaptionFormat;
md.CaptionFOrmatStr := dim.CaptionFormatStr;
//*******error md.EmptyItems := dim.EmptyItems;
md.FIndex := i;
md.FOrder := i;
for j := 0 to dim.Count - 1 do


line
prosoft
User
 
Posts: 14
Joined: Tue Nov 27, 2007 3:35 pm

Postby AlexZencovich » Thu Nov 29, 2007 6:04 pm

looks quite strange....assigning string and enum fields to produce AV? (BTW - for my PC it does not produce AV anyway)

Check if you not have an old zCube.dll registered. These properties has been added near 1-1.5 year ago and if you have older zCube.dll registered you may really get AV on access to unexisted members
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 prosoft » Fri Nov 30, 2007 3:03 pm

I unistalled and unregistered dll and install again but it doesn't resolve my problem.

I have to comment these lines. It is no problem for me.


Thanks
ZVo.
prosoft
User
 
Posts: 14
Joined: Tue Nov 27, 2007 3:35 pm

Postby AlexZencovich » Sun Dec 02, 2007 12:15 pm

1 I'm interested if someone else have similar problems with Delphi 2007.

2 Could you try to add code like

md.SaveData := True;
in line after
//*******error md.EmptyItems := dim.EmptyItems;

and try to compile? (I just interesting if there will not compilation errors or AV too)
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 prosoft » Mon Dec 03, 2007 6:58 am

I will create demo for you. It is based on DBF file and xml. I'll send source and dbf file to you.
prosoft
User
 
Posts: 14
Joined: Tue Nov 27, 2007 3:35 pm

Demo

Postby prosoft » Mon Dec 03, 2007 12:33 pm

I am sending file pivot.zip to your private email. It is simple example of my application.

Zvo.
prosoft
User
 
Posts: 14
Joined: Tue Nov 27, 2007 3:35 pm

Postby AlexZencovich » Sun Dec 09, 2007 9:04 pm

No errors with your demo. Sorry.
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 5 guests

cron