Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSGraph
Message
From
30/11/1998 11:25:20
 
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00162413
Message ID:
00162423
Views:
24
>>>My coworker has a form with a graph from MSGraph on it. He has been unable to find a way to print the graph. Anyone know how?
>>>
>>>Thanks,
>>>
>>>-Michelle
>>
>>If you store graph in General field, then you add Picture/OLE Bound Control to Report form, bind it to this field and print.
>
>How do you store the graph in a general field? Right now, it's just a control on a form.
>
>Thanks,
>
>-Michelle

You should get some values inside the control to show some graph, right?
for nLoop=1 to alen(aValues,1)  && aValues contains needed values from table(s)
 cLegends=cLegends+chr(9)+alltrim(aValues[nLoop,1])+ ;
  str(100*aValues[nLoop,2]/nCounthist,6,2)+"%"
  cValues=cValues+chr(9)+str(aValues[nLoop,2])
endfor
cGraphstring=cLegends+chr(13)+chr(10)+"Value"+cValues
wait window "Formatting Graph... Wait, Please!" nowait
if used("tmpStat3")
 select tmpStat3
 use
endif
create cursor tmpStat3 (genfield G)
append blank
append general genfield class "msgraph.chart" data cGraphstring
if type("this.oleGraph")<>"O" 
 this.addobject("oleGraph","Oleboundcontrol")
endif
with this.oleGraph
 .left=this.shGraph.left+1
 .width=this.shGraph.width-2
 .top=this.shGraph.top+1
 .height=this.shGraph.height-2
 .autoactivate=0		&& no on-line setting
 .controlsource="tmpStat3.genfield"
 do case
  case nStyle=1	&& bar
   .haslegend=.f.
  case nStyle=2	&& pie
   .haslegend=.t.
   .autoformat(5,1)
 endcase
 .visible=.t.
endwith
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform