Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cesar
  Where is Cesar?
 
 Brazil
 Cesar
 To: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 Tags
Subject: RE: print chart
Thread ID: 248704 Message ID: 248806 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Wednesday, December 23, 2009 2:20:11 PM         
   


> hi,
> thank you so much,
>
> i need to use getfile at thisform but i think the code must be at click event or keybress not at init event
>
> as
>
> thisform.text3.Value=GETFILE()
> USE (thisform.text3.Value) IN 0
> 
> SELECT month,poor,fair FROM (thisform.text3.Value) INTO CURSOR Sales2 readwrite
> 

>
> and i need help to remove vfpx powerd at the top of page
> >
> > Mohammed,
> >
> > There is another very easy and simple way to print images directly, totally safe.
> >
> > Please go to the link below
> > http://weblogs.foxite.com/vfpimaging/archive/2007/01/17/3143.aspx
> >
> > Just save the codes you'll find there to a PRG file, called "PrintImage.Prg"
> >
> > To use it, just run the command below:
> >
> >
=PRINTIMAGE(GETPICT(), "ORIENTATION=1" + CHR(13) + "COPIES=3" + CHR(13) + "COLOR=1"

> >
> > That will print 3 copies of your image in LandScape and GreyScale.
> > Have a look at the blog post, you can customize other things as well.
> >
> > The big advantage of that aproach is that you send to VFP the responsibility to print your image, no need of API calls or external stuff.
> >
> > So, for your particular case, you should do the following.
> >
> >
* 1 - Save the current chart to a temp file in disk
> > LOCAL lcFile
> > lcFile = ADDBS(GETENV("TEMP")) + "_TempImg_" + SYS(2015)
> > lcFile = FORCEEXT(lcFile, "PNG")
> > Thisform.FoxCharts1.SaveToFile(lcFile)
> > 
> > * 2 - Print the saved Image
> > =PRINTIMAGE(lcFile)
> > 
> > * 3 - Delete the Temporary Image from disk
> > TRY
> >    DELETE FILE(lcFile)
> > CATCH
> > ENDTRY

> >
> >
> > HTH
> >
> > Regards,
> >
> > Cesar
> > My Blog

I didn't understand your question...
Why do you need GetFile ?
To get the chart data ?

If that is the case, and you can't generate the data automatically, then, add a button, and put that code in the Click event of it, and call the method "DrawChart" from FoxCharts from there.

Regards,

Cesar
My Blog

ENTIRE THREAD

print chart Posted by mohammed qasem @ 12/22/2009 12:27:20 PM
RE: print chart Posted by Cesar @ 12/22/2009 12:42:07 PM
RE: print chart Posted by Cesar @ 12/23/2009 10:38:56 AM
RE: print chart Posted by mohammed qasem @ 12/23/2009 1:20:43 PM
RE: print chart Posted by Cesar @ 12/23/2009 2:20:11 PM
RE: print chart Posted by mohammed qasem @ 12/24/2009 8:24:34 AM
RE: print chart Posted by Cesar @ 12/24/2009 11:41:55 AM
RE: print chart Posted by mohammed qasem @ 12/24/2009 12:08:05 PM