Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GRAPHS
Message
From
26/03/1998 13:59:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: GRAPHS
Miscellaneous
Thread ID:
00087138
Message ID:
00087405
Views:
53
>>>I created a query and sent the out put to a graph but how can I get the nice graph to the printer??? vfp5.0
>>You could use report to print. Or if it's an excelchart object you can call object.fileprint().
>>Cetin
>iT CREATES A "OLEGRAPH" AND I CAN'T FIND A .DBF TO SENT TO A REPORT.

Then create your own. Following is a basic example :
*Form.init
THIS.LockScreen = .T.
#DEFINE TAB CHR(9)
#DEFINE CRLF CHR(13)+CHR(10)
THIS.LockScreen = .T.
M.CGDATA = ""
for ix=1 to 100
    m.cgdata = m.cgdata+TAB+"val"+str(ix)
endfor
m.cgdata = m.cgdata +crlf+"Value"
for ix=1 to 100
   m.cgdata = m.cgdata+TAB+str(ix)
endfor
m.cgdata = m.cgdata +crlf+"Value1"
for ix=1 to 100
    m.cgdata = m.cgdata+TAB+str(ix*1.5)
endfor
create cursor foo1 (gen1 g)
append blank
append general gen1 class "msgraph.chart" DATA M.CGData
this.addobject("OleBoundControl1","OleBoundControl")
THIS.OleBoundControl1.height = this.height - 2
THIS.OleBoundControl1.width = this.width - 2
THIS.OleBoundControl1.top = 1
THIS.OleBoundControl1.left= 1
THIS.OleBoundControl1.ControlSource = "Gen1"
THIS.OleBoundControl1.HasLegend = .t.
THIS.OleBoundControl1.autoformat(1, 1)
THIS.LockScreen = .F.
If Olegraph has an option to print then you could call it too :
thisform.Olegraph.fileprint()
What is the OLE source ?
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform