峻
峻祁连
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么作独立点值专题图速度这么慢啊? 数据量4000条记录左右
各位大侠帮我看看错在哪儿了。我想根据客户代码的作废标志(zfbz)的不同
把不同类型的客户区分出来
procedure TfrmMain.DispNoActiveExecute(Sender: TObject);
var
dsKhStatus : CmapXDataset;
flds : CmapXFields;
thmZFKH : CMapXTheme;
pntStyle :CMapXStyle;
myfont : TFont;
i : integer;
begin
AdoQuery1.Close;
AdoQuery1.SQL.Clear;
AdoQuery1.SQL.Add('select khdm,zfbz,tybz,xybz from khxx');
AdoQuery1.Open;
flds := CoFields.Create();
flds.Add('khdm','客户代码',EmptyParam,EmptyParam);
flds.Add('zfbz','作废客户',miAggregationIndividual,EmptyParam);
dsKhStatus := map1.Datasets.Add(miDataSetADO,
adoQuery1.Recordset, 'dstKhStatus','客户代码',EmptyParam,
'烟草销售点', flds, true);
screen.Cursor := crHorse;
flds.Remove(1);
dsKhStatus.Themes.Add(miThemeIndividualValue,flds,EmptyParam,true);
//这句执行起来很慢的,大概要5-6分钟 ,why???
thmZFKH := dsKhStatus.Themes.Item(1);
myfont := TFont.Create();
for i := 1 to thmZFKH.ThemeProperties.IndividualValueCategories.Countdo
begin
pntStyle := thmZFKH.ThemeProperties.IndividualValueCategories.Item(i).Style.Clone;
pntStyle.SymbolType := miSymbolTypeVector
// myfont := TFont(pntStyle.SymbolFont);
// myfont.Name := TFontName('Map Symboles');
//上面改字体的出错,访问ntdll.dll错误 mapX的pntStyle.SymbolFont返回类型
//是IFontDisp类型,但Delphi好像没有这个类型,强制转换后就会出现访问ntdll.dll
//某地址错误,怎么办啊??
pntStyle.SymbolVectorSize := 20;
if i = 1 then
pntStyle.SymbolVectorColor := miColorRed;
if i = 2 then
pntStyle.SymbolVectorColor := miColorGreen;
pntStyle.SymbolCharacter := 35
thmZFKH.ThemeProperties.IndividualValueCategories.Item(i).Style := pntStyle;
end;
thmZFKH.AutoRecompute := true;
thmZFKH.ComputeTheme := true;
thmZFKH.Visible := true;
screen.Cursor := crDefault;
end;
各位大侠帮我看看错在哪儿了。我想根据客户代码的作废标志(zfbz)的不同
把不同类型的客户区分出来
procedure TfrmMain.DispNoActiveExecute(Sender: TObject);
var
dsKhStatus : CmapXDataset;
flds : CmapXFields;
thmZFKH : CMapXTheme;
pntStyle :CMapXStyle;
myfont : TFont;
i : integer;
begin
AdoQuery1.Close;
AdoQuery1.SQL.Clear;
AdoQuery1.SQL.Add('select khdm,zfbz,tybz,xybz from khxx');
AdoQuery1.Open;
flds := CoFields.Create();
flds.Add('khdm','客户代码',EmptyParam,EmptyParam);
flds.Add('zfbz','作废客户',miAggregationIndividual,EmptyParam);
dsKhStatus := map1.Datasets.Add(miDataSetADO,
adoQuery1.Recordset, 'dstKhStatus','客户代码',EmptyParam,
'烟草销售点', flds, true);
screen.Cursor := crHorse;
flds.Remove(1);
dsKhStatus.Themes.Add(miThemeIndividualValue,flds,EmptyParam,true);
//这句执行起来很慢的,大概要5-6分钟 ,why???
thmZFKH := dsKhStatus.Themes.Item(1);
myfont := TFont.Create();
for i := 1 to thmZFKH.ThemeProperties.IndividualValueCategories.Countdo
begin
pntStyle := thmZFKH.ThemeProperties.IndividualValueCategories.Item(i).Style.Clone;
pntStyle.SymbolType := miSymbolTypeVector
// myfont := TFont(pntStyle.SymbolFont);
// myfont.Name := TFontName('Map Symboles');
//上面改字体的出错,访问ntdll.dll错误 mapX的pntStyle.SymbolFont返回类型
//是IFontDisp类型,但Delphi好像没有这个类型,强制转换后就会出现访问ntdll.dll
//某地址错误,怎么办啊??
pntStyle.SymbolVectorSize := 20;
if i = 1 then
pntStyle.SymbolVectorColor := miColorRed;
if i = 2 then
pntStyle.SymbolVectorColor := miColorGreen;
pntStyle.SymbolCharacter := 35
thmZFKH.ThemeProperties.IndividualValueCategories.Item(i).Style := pntStyle;
end;
thmZFKH.AutoRecompute := true;
thmZFKH.ComputeTheme := true;
thmZFKH.Visible := true;
screen.Cursor := crDefault;
end;