TC Report post Posted February 18, 2010 (edited) Trying to call my first Fusion Chart from VB.Net. I'm getting the error you see on the Subject line, with this code: Dim FC As Object = New FusionCharts Dim ds As New DataSet Call FC.setChartType("pie3d") Call FC.setSize("650", "450") Call FC.setSWFPath("Fusion/FusionCharts/") Dim strParam$ = "caption=Factory Output report;subCaption=By Quantity;pieSliceDepth=30;numberSuffix= Units;decimals=0" Call FC.setChartParams(strParam) Dim Adapter As New SqlDataAdapter Dim strConn As String = ConfigurationManager.ConnectionStrings("LFCS").ConnectionString Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("LFCS").ConnectionString) Dim cmd As SqlCommand = conn.CreateCommand Adapter = New SqlDataAdapter("vwTest", ConfigurationManager.ConnectionStrings("LFCS").ConnectionString) Adapter.Fill(ds) : Adapter.Dispose() Call FC.addDataFromDatabase(ds, "total", "FactoryName", "", "") ds.Dispose() Call FC.renderChart(False) Any ideas? Also, these are my imports at the top of my CodeBehind: Imports InfoSoftGlobal Imports System.Data.SqlClient Imports System.Data Imports System.Text ======================= Another question: Notice I perform "Dim FC = New FusionCharts" Should that be: "Dim FC As New FusionCharts" ? When I make that change, all references to FC get underlined with a comment that each underline is not a member of 'InfosoftGlobal.FusionCharts.'......so maybe not. An additional piece of info, that will help you all help me solve this is this: I see I didn't have FusionCharts_Get.asp in my project. I believe that .asp file exposes the FusionCharts class. Or does the "Imports InfoSoftGlobal" do that? So, I put FusionCharts.asp, and FusionCharts_Gen.asp, both in my App_Code folder, but it didn't solve my problem. I'm still getting the same error. Edited February 19, 2010 by Guest Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted February 25, 2010 Hi, Thanks for stretching the horizons of FusionCharts and its implementation in various technologies. You are working in VB.NET but using code that works in Classic ASP. Both are mutually incompatible. But, the ASP Class is created (compatible with) in Classic ASP (VB) and not compatible with ASP.NET VB. Please read : http://www.beansoftware.com/ASP.NET-Tutorials/Classic-ASP-vs-ASP.NET.aspx, http://www.vbdotnetforums.com/asp-net-general-discussion/38046-asp-classic-vs-asp-net.html etc. So, VB in Classic is not same as ASP.NET VB. Hence, the code for Classic ASP (VB) wont work in VB.NET. BOTTOMLINE. The code can not be used in VB.NET. Please understand that it was developed by and for Classic ASP (VB). There is no concept of user-defined object datatype in Classic ASP. Hence the first error. Again, "Dim FC As New FusionCharts" this wont work as there is not concept for this. FusionCharts.asp, and FusionCharts_Gen.asp would work in Classic ASP (VB) implementation and not in ASP.NET VB. Share this post Link to post Share on other sites
TC Report post Posted February 25, 2010 Thank you for the reply. I understand. I fought with this issue for quite some time, as I find it hard to believe you folks don't support VB.NET. Do you have any plans on doing so, in the future? Share this post Link to post Share on other sites
FusionCharts Support Report post Posted February 26, 2010 Hi, We do have support for VB.NET. http://www.fusioncharts.com/docs/Contents/VBNET_BasicExample.html http://www.fusioncharts.com/docs/Contents/VBNET_Array.html http://www.fusioncharts.com/docs/Contents/VBNET_Form.html http://www.fusioncharts.com/docs/Contents/VBNET_DB.html http://www.fusioncharts.com/docs/Contents/VB_MasterPages.html http://www.fusioncharts.com/docs/Contents/VB_UpdatePanel.html http://www.fusioncharts.com/docs/Contents/VBNET_JS_URL.html http://www.fusioncharts.com/docs/Contents/VBNET_JS_XML.html BluePrint Application: http://www.fusioncharts.com/Downloads/Blueprint/FusionCharts_VBNET.zip But, we do not as of now have a chart's data building API in ASP.NET. We have this in our wish-list. Cheers! Share this post Link to post Share on other sites