Why am I geting this error when running this code (Using Pro ActiveX 2010.0.0.3 )
Error : "Unable to cast object of type 'AxTeeChart.AxTChart' to type 'TeeChart.TChart'."
With TeePreviewer1
.Chart = TChart1
.PreviewTitle = "My Custom Title"
.ShowPreview()
End With
Regards
Tom
TeePreviewer InvalidCastExpectation
Re: TeePreviewer InvalidCastExpectation
Hello Tom,
I couldn't reproduce your problem here with last version of TeeChartActivex. Can you please, send us a simple project because we can reproduce exactly your here?
Thanks,
I couldn't reproduce your problem here with last version of TeeChartActivex. Can you please, send us a simple project because we can reproduce exactly your here?
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TeePreviewer InvalidCastExpectation
Hi,
Attached is a small project file as requested. I look forward to your resolution asap, this issue is very frustrating to say the least.
OS: Windows 7 Professional
Processor: Intel Core(TM)2 Quad CPU Q8200 @2.33GHz
Visual Studio 2010 Sp1 (VB.NET)
Installed TeeCharts:
TeeChart Version 7.0.1.4
TeeChart Version 8.0.0.5
TeeChart Pro v2010.0.0.3.11109 Win32
Regards,
Tom
Attached is a small project file as requested. I look forward to your resolution asap, this issue is very frustrating to say the least.
OS: Windows 7 Professional
Processor: Intel Core(TM)2 Quad CPU Q8200 @2.33GHz
Visual Studio 2010 Sp1 (VB.NET)
Installed TeeCharts:
TeeChart Version 7.0.1.4
TeeChart Version 8.0.0.5
TeeChart Pro v2010.0.0.3.11109 Win32
Regards,
Tom
- Attachments
-
- WindowsTestApplication.zip
- Test Project file
- (279.72 KiB) Downloaded 512 times
Re: TeePreviewer InvalidCastExpectation
Hello Tom,
Thanks for your project. I could reproduce your problem and I found that Previewer and Chart aren't linked correctly:
To link the Previewer with chart you need use ChartLink so do in next lines of code:
Could you modify your code and check if it solve your problem?
I hope will helps.
Thanks,
Thanks for your project. I could reproduce your problem and I found that Previewer and Chart aren't linked correctly:
Code: Select all
With AxTeePreviewer1
.Chart = AxTChart1
.........
Code: Select all
With AxTeePreviewer1
.ChartLink = AxTChart1.ChartLink
.......
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: TeePreviewer InvalidCastExpectation
Hi Sandra,
Thank you for your quick response, the code now works.
By the way, the code I sent you was from your forum site.
Thanks again
Tom
Thank you for your quick response, the code now works.
By the way, the code I sent you was from your forum site.
Thanks again
Tom
Re: TeePreviewer InvalidCastExpectation
Hello Tom,
I am glad that your problem is solved. About of initially code you were using, I inform you that it is made in Visual Basic 6.0 so it doesn't work if you use Visual Studio where you need use ChartLink.
Thanks,
I am glad that your problem is solved. About of initially code you were using, I inform you that it is made in Visual Basic 6.0 so it doesn't work if you use Visual Studio where you need use ChartLink.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |