Foxcharts data cursor

Topics: Attention VFPX Admins
Jun 4, 2010 at 3:50 PM

I have a problem with foxcharts 1.20.

I use vfp9 sp2 and I am trying to use foxcharts.

The problem is that when I call the form containing foxcharts from another form which has created the data cursor to show,

foxcharts raises an error "Alias not found", in fact I noted that seems that foxcharts closes all the open files and when I close the foxcharts form, the

data cursor becomes accessible.

Then the question is how to pass a data table to foxcharts without write it to disk? 

Naturally the examples provided in the project work fine because the cursor is created in the init method of the form but I need to read data from

an open dbf file or cursor.

Any idea?

Thank You very much.

Rocco

 

 

 

Jun 4, 2010 at 8:17 PM

Hi,

in any case use the debugger to reveal to you which alias is not found. I presume it is the cursor you created with data to produce a chart or is it an other alias?

To make FoxCharts work correctly you have to make use of the property FoxCharts.SourceAlias.  Take a look at the samples and follow any form. In the init the datacursor is created, this creating can also be an already exsisiting cursor.  So you must make a statement like  Thisform.FoxCharts1.SourceAlias = ''crsMyCursor"  etc.

 

Regards,

Koen

 

 

Jun 7, 2010 at 6:52 AM
Hi,

It is exactly whay I have done.

In the FoxCharts.SourceAlias I have put the name of the alias containing the data to show.

In that case the message "alias not found" appeared for the first time.

After that I tried to select a workarea alias like "select customer" where the alias has been opened in the other form but still opened in the application and the result
was the same.

I put the above 'select' statement in the init method of the form containing foxcharts, if I remove foxcharts from the form, the alias can be selected, otherwise not.

As soon that I close the foxcharts form, the alias become selectable.

I have made these tests within foxpro, but I think that compiling the app, nothing change.

I do not know, it seems that foxcharts 'freeze' the tables workareas when it is lauched and then releases them as soon it it closed.

Maybe something is missing in my foxpro environment?

Naturally if I open any filein the init method of the form containing foxcharts, everithing works but this means that I have to write the data file to disk for passing it to foxcharts.
I do not think that it work in this way.

Many thanks.

Rocco Girardi



Il 04/06/2010 22.17, Koen ha scritto:

From: Koen

Hi,

in any case use the debugger to reveal to you which alias is not found. I presume it is the cursor you created with data to produce a chart or is it an other alias?

To make FoxCharts work correctly you have to make use of the property FoxCharts.SourceAlias.  Take a look at the samples and follow any form. In the init the datacursor is created, this creating can also be an already exsisiting cursor.  So you must make a statement like  Thisform.FoxCharts1.SourceAlias = ''crsMyCursor"  etc.

 

Regards,

Koen

 

 


Jun 7, 2010 at 8:13 AM
Edited Jun 7, 2010 at 8:18 AM
Hi, Please double check in the debugger about which alias() FoxCharts is 'complaining' . Jim Nelson also has an idea you could have a datasession problem. Are you in a private Datasession? Please check also. In case you still cannot succeed, I would like to see your complete startup procedure to double check Regards, Koen
Jun 7, 2010 at 12:51 PM
Thank You,

Problem solved putting the form datasession property to 1.

Sorry but I did search for the problem within the foxchart component and not in the related form.

Many thanks again.

Rocco


Il 07/06/2010 10.14, Koen ha scritto:

From: Koen

Hi, Please double check in the debugger about which alias() FoxCharts is 'complaining' . Jim Nelson also has an idea you could have a datasession problem. Please check also. In case you still cannot succeed, I would like to see your complete startup procedure to double check Regards, Koen