Manjit,
I'm happy to help and glad you managed to solve the problem. If you need to
post the report just send me a copy and I'll post a link.

Dave Crozier

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Manjit Basra
Sent: 28 March 2008 20:30
To: ProFox Email List
Subject: RE: VFP and Graph - RMChart - OLE IDispatch exception

Thanks Dave. I was able to create a simple class library with a form and
the RMChart OLE control. This way (oForm.oChart) I can access all the
methods and properties of the RMChart OLE object without any errors.
Thanks problem solved.

I think someone requested a copy of the report to be posted. I don't
know who to send the PDF to be posted?

Thanks again for all your help.

Manjit 


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Crozier
Sent: Thursday, March 27, 2008 9:43 AM
To: 'ProFox Email List'
Subject: RE: VFP and Graph - RMChart - OLE IDispatch exception

Manjit,
Now I see. In that case, do all the work as per my demo but just don't
make
the Form visible . You can still do the Draw2File regardless as long as
you
have don't se graph setting up correctly. In my demo just put:

RaiseEvent(oForm.btnChart, "Click")
RaiseEvent(oForm.btnPrint, "Click")
wait window "Preparing graph" nowait noclear

immediately before the oForm.Visible=.T.

This will force a programmatic graph generation followed by a graph
print.

The added advantage of doing is this way for developing is that you can
keep
the form visible at all times or simply on request just to check that
the
layout is OK and then toggle the form (Preview) Visible on/off at any
time.

Dave Crozier

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
Of Manjit Basra
Sent: 27 March 2008 13:21
To: ProFox Email List
Subject: RE: VFP and Graph - RMChart - OLE IDispatch exception

Dave,

I am not displaying the graph. I just want to create a JPG file using
"Draw2File" method and print the JPG on the report.



Manjit Basra


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
Of Dave Crozier
Sent: Thursday, March 27, 2008 7:31 AM
To: 'ProFox Email List'
Subject: RE: VFP and Graph - RMChart - OLE IDispatch exception

Sytze and Manjit,

To print simply use the following commands:

With Thisform.oChart as RMCHART.RMChartX 
        .Draw2Printer
        *
Endwith


And Manjit, for your benefit I have a .prg version of the Form based
program
which may well help with your query. However, if you have no GUI, then
where
do you envisage displaying the graph? I think I am not understanding
something here - but it has been a hard week!


Dave Crozier


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
Of Sytze de Boer
Sent: 26 March 2008 18:55
To: profox@leafe.com
Subject: Re: VFP and Graph - RMChart - OLE IDispatch exception

I'm watching this thread with interest because I'm trying to include
this
with my own App
When you've figured out how to print, let me know please

Sytze


On Thu, Mar 27, 2008 at 6:50 AM, Manjit Basra
<[EMAIL PROTECTED]>
wrote:

> Hi,
>
> Dave, thanks for recommending RMChart for graphs and the sample code.
It
> works great even in VFP7.
>
> I downloaded and installed RMChart 4.12. I am using VFP7. I use the
> following command to create an instance:
>
> obj = CREATEOBJECT("RMChart.RMChartX")
>
> No problem. However, when I issue the following commands:
>
> obj.Reset
> obj.SetProperties(640, 400, 0, 2, "", "Tahoma", , , , )
>
> I get the following error for both of the lines:
>
> "OLE IDispatch exception code 0 from RMChart: Object variable or With
> block variable not set."
>
> I am trying to create a report for my web based app. The EXE file has
no
> GUI objects. That is why I need to use CREATEOBJECT().
>
> Any thought? Appreciate your help.
>
>
>
> Manjit
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to