Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSGraph 97 Ole Error
Message
De
22/02/2005 19:37:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/02/2005 19:14:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00989476
Message ID:
00989479
Vues:
35
>Using the code below I get an error when the program gets to export method.
>
>The error is:
>Ole Error Code 0x800A03EC
>Unknown Com Status
>
>Anyone know why this would occur? It draws the graph fine and I registered graph8.exe and all its dependencies using: graph8 /automation
>
>
> * Create the component
> pie = CREATEOBJECT("MSGraph.Chart.8")
> ds = pie.Application.DataSheet
> ds.Cells.Clear
> pie.Width = 500
> pie.Height = 500
>
> ds.Cells(1,2).Value = "TITI alain"
> ds.Cells(2,2).Value = "11,20"
> ds.Cells(1,3).Value = "vient gΘrard"
> ds.Cells(2,3).Value = "15"
>
> ds.Cells(1,4).Value = "TOTO FABRICE"
> ds.Cells(2,4).Value = "17"
> ds.Cells(1,5).Value = "EMILE CLAUDE"
> ds.Cells(2,5).Value = "19"
> ds.Cells(1,6).Value = "BERNARD BERNARD"
> ds.Cells(2,6).Value = "20"
> ds.Cells(1,7).Value = "TUTU ALAIN"
> ds.Cells(2,7).Value = "22"
>
> pie.ChartType = -4102
> pie.HasLegend = .T.
> pie.HasTitle = .F.
> pie.Legend.Font.Size = 8
> pie.Legend.AutoScaleFont = .T.
> pie.ApplyDataLabels
> pie.SeriesCollection(1).DataLabels.AutoScaleFont = .T.
> pie.SeriesCollection(1).DataLabels.Font.Size = 8
> pie.SeriesCollection(1).Interior.ColorIndex = 36
> pie.ChartArea.Interior.ColorIndex = 2
> pie.PlotArea.Width = 200
> pie.PlotArea.Height = 200
>
> tFile = "c:\pie.gif"
> pie.Export(tFile) && <-- Error occurs here
>
I don't get an error but MSGraph is not reliable and Office dependant. The same code runs fine w/o a single change on this computer but I bet would crash in many others.
You might try with some other filter. ie:

tFile = "c:\pie.jpg"
pie.Export(tFile,"JPEG")

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform