Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: CJ Wiley
  Where is CJ Wiley?
 Hideaway
 Texas - United States
 CJ Wiley
 To: Marcia Akins
  Where is Marcia Akins?
 Akorn
 Ohio - United States
 Marcia Akins
 Tags
Subject: OLEGraph in a VFP Report
Thread ID: 104282 Message ID: 104298 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Monday, August 14, 2006 7:56:01 PM         
   


Thank you for your response Marcia!

My OLEGraph is in a VFP Report.

Below is my code for the OLEGraph section:


SELECT mygraph
cGraphField = "olegraph" &&name of General field
oGraphform =CreateObject("form")
oGraphform.ADDOBJECT("ole1","oleboundcontrol")
oGraph = m.oGraphform.ole1
WITH oGraph
.ControlSource = m.cGraphField
.HasDataTable = .T.
.DataTable.HasBorderOutline = .T.
.DataTable.Font.Name = "Arial"
.DataTable.Font.Size = 12
.DataTable.Font.Italic = .T.
.DataTable.Font.Bold = .T.
* Add legend to chart
.HasLegend = .T.
.HasTitle = .T.
* Add a title to a chart
.ChartTitle.Caption = "J Graph Title"
* Set the graph's chart type to 3D Area
.type = 9
* Set the graph's chart using AutoFormat to 3D Pie.
.width = 800
.height = 500
.refresh
ENDWITH


REPLACE olegraph WITH mygraph.olegraph

SELECT mygraph0
REPLACE olechart WITH mygraph.olegraph

oGraphRef = ""
oGraphform = ""







> I have an OLE graph printing on my report, but the background is gray.
> How do I change the background to white?

>
> If this is a chart created using Excel Auotmation, you can manipulate its properties by instantiating it in an OLEBound control in an invisible form and change the color using this code:
>
>
> Thisform.oGraph.Object.ActiveChart.Walls.Interior.Color = RGB( 255, 255, 255 )
> 

>
>
> Regards,
> Marcia G. Akins
> Tightline Computers, Inc.


ENTIRE THREAD

Graph Background color? Posted by CJ Wiley @ 8/14/2006 4:49:45 PM
RE: Graph Background color? Posted by Marcia Akins @ 8/14/2006 6:02:05 PM
OLEGraph in a VFP Report Posted by CJ Wiley @ 8/14/2006 7:56:01 PM
I found the answer Posted by CJ Wiley @ 8/15/2006 5:55:04 PM
RE: I found the answer Posted by Marcia Akins @ 8/16/2006 12:30:31 PM
RE: I found the answer Posted by CJ Wiley @ 8/16/2006 5:26:55 PM
RE: I found the answer Posted by Marcia Akins @ 8/16/2006 8:42:54 PM