User (Legacy) Posted September 25, 2003 Author Report Share Posted September 25, 2003 I'm having problems with populating my chart. I'am using MS visual studio.net for my webpage design. When I run my application I can see a chart and there are no error massages. Only the chart data seems to be random and not a representation of my data. If I bind the datareader to a datagrid I do see the correct data. I think there is a bug or a problem with chartfx that it wil not bind the DataSource to a SqlDataReader?!? Can you help me out here? here is the vb-code for the page load routine 'Put user code to initialize the page here Dim conPrins As New SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog _db2") Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", conPrins) Dim dtr As SqlClient.SqlDataReader cmdSelect.CommandType = CommandType.StoredProcedure cmdSelect.Parameters.Add("@objecttag", "TI600E27") cmdSelect.Parameters.Add("@begintijd", "9/1/2003") cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") conPrins.Open() dtr = cmdSelect.ExecuteReader Chart1.DataSource = dtr 'DataGrid1.DataSource = dtr 'DataGrid1.DataBind() dtr.Close() conPrins.Close() Regards Bas Volkers Link to comment Share on other sites More sharing options...
User (Legacy) Posted September 25, 2003 Report Share Posted September 25, 2003 I'm having problems with populating my chart. I'am using MS visual studio.net for my webpage design. When I run my application I can see a chart and there are no error massages. Only the chart data seems to be random and not a representation of my data. If I bind the datareader to a datagrid I do see the correct data. I think there is a bug or a problem with chartfx that it wil not bind the DataSource to a SqlDataReader?!? Can you help me out here? here is the vb-code for the page load routine 'Put user code to initialize the page here Dim conPrins As New SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog _db2") Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", conPrins) Dim dtr As SqlClient.SqlDataReader cmdSelect.CommandType = CommandType.StoredProcedure cmdSelect.Parameters.Add("@objecttag", "TI600E27") cmdSelect.Parameters.Add("@begintijd", "9/1/2003") cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") conPrins.Open() dtr = cmdSelect.ExecuteReader Chart1.DataSource = dtr 'DataGrid1.DataSource = dtr 'DataGrid1.DataBind() dtr.Close() conPrins.Close() Regards Bas Volkers Link to comment Share on other sites More sharing options...
Software FX Posted October 3, 2003 Report Share Posted October 3, 2003 Hello, ChartFX Lite is a WindowsForms only control and can not be used in a webpage. JT Tech. Support "Bas Volkers" <basvolkers@admworld.com> wrote in message news:1BZlQt0gDHA.1496@WEBSERVER1... > I'm having problems with populating my chart. I'am using MS visual > studio.net for my webpage design. When I run my application I can see a > chart and there are no error massages. Only the chart data seems to be > random and not a representation of my data. If I bind the datareader to a > datagrid I do see the correct data. I think there is a bug or a problem with > chartfx that it wil not bind the DataSource to a SqlDataReader?!? > Can you help me out here? > > here is the vb-code for the page load routine > > 'Put user code to initialize the page here > Dim conPrins As New > SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog > _db2") > Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", conPrins) > Dim dtr As SqlClient.SqlDataReader > cmdSelect.CommandType = CommandType.StoredProcedure > cmdSelect.Parameters.Add("@objecttag", "TI600E27") > cmdSelect.Parameters.Add("@begintijd", "9/1/2003") > cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") > conPrins.Open() > dtr = cmdSelect.ExecuteReader > Chart1.DataSource = dtr > 'DataGrid1.DataSource = dtr > 'DataGrid1.DataBind() > dtr.Close() > conPrins.Close() > > Regards > Bas Volkers > > Link to comment Share on other sites More sharing options...
Software FX Posted October 3, 2003 Report Share Posted October 3, 2003 Hello, ChartFX Lite is a WindowsForms only control and can not be used in a webpage. JT Tech. Support "Bas Volkers" <basvolkers@admworld.com> wrote in message news:1BZlQt0gDHA.1496@WEBSERVER1... > I'm having problems with populating my chart. I'am using MS visual > studio.net for my webpage design. When I run my application I can see a > chart and there are no error massages. Only the chart data seems to be > random and not a representation of my data. If I bind the datareader to a > datagrid I do see the correct data. I think there is a bug or a problem with > chartfx that it wil not bind the DataSource to a SqlDataReader?!? > Can you help me out here? > > here is the vb-code for the page load routine > > 'Put user code to initialize the page here > Dim conPrins As New > SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog > _db2") > Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", conPrins) > Dim dtr As SqlClient.SqlDataReader > cmdSelect.CommandType = CommandType.StoredProcedure > cmdSelect.Parameters.Add("@objecttag", "TI600E27") > cmdSelect.Parameters.Add("@begintijd", "9/1/2003") > cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") > conPrins.Open() > dtr = cmdSelect.ExecuteReader > Chart1.DataSource = dtr > 'DataGrid1.DataSource = dtr > 'DataGrid1.DataBind() > dtr.Close() > conPrins.Close() > > Regards > Bas Volkers > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted October 11, 2003 Author Report Share Posted October 11, 2003 which newsgroup do we use for chartfx lite for ASP.net? "SFX Tech Support" <support@softwarefx.com> wrote in message news:w8%23OjrciDHA.3600@WEBSERVER1... > Hello, > > ChartFX Lite is a WindowsForms only control and can not be used in a > webpage. > > JT > Tech. Support > > "Bas Volkers" <basvolkers@admworld.com> wrote in message > news:1BZlQt0gDHA.1496@WEBSERVER1... > > I'm having problems with populating my chart. I'am using MS visual > > studio.net for my webpage design. When I run my application I can see a > > chart and there are no error massages. Only the chart data seems to be > > random and not a representation of my data. If I bind the datareader to a > > datagrid I do see the correct data. I think there is a bug or a problem > with > > chartfx that it wil not bind the DataSource to a SqlDataReader?!? > > Can you help me out here? > > > > here is the vb-code for the page load routine > > > > 'Put user code to initialize the page here > > Dim conPrins As New > > > SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog > > _db2") > > Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", conPrins) > > Dim dtr As SqlClient.SqlDataReader > > cmdSelect.CommandType = CommandType.StoredProcedure > > cmdSelect.Parameters.Add("@objecttag", "TI600E27") > > cmdSelect.Parameters.Add("@begintijd", "9/1/2003") > > cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") > > conPrins.Open() > > dtr = cmdSelect.ExecuteReader > > Chart1.DataSource = dtr > > 'DataGrid1.DataSource = dtr > > 'DataGrid1.DataBind() > > dtr.Close() > > conPrins.Close() > > > > Regards > > Bas Volkers > > > > > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted October 11, 2003 Author Report Share Posted October 11, 2003 which newsgroup do we use for chartfx lite for ASP.net? "SFX Tech Support" <support@softwarefx.com> wrote in message news:w8%23OjrciDHA.3600@WEBSERVER1... > Hello, > > ChartFX Lite is a WindowsForms only control and can not be used in a > webpage. > > JT > Tech. Support > > "Bas Volkers" <basvolkers@admworld.com> wrote in message > news:1BZlQt0gDHA.1496@WEBSERVER1... > > I'm having problems with populating my chart. I'am using MS visual > > studio.net for my webpage design. When I run my application I can see a > > chart and there are no error massages. Only the chart data seems to be > > random and not a representation of my data. If I bind the datareader to a > > datagrid I do see the correct data. I think there is a bug or a problem > with > > chartfx that it wil not bind the DataSource to a SqlDataReader?!? > > Can you help me out here? > > > > here is the vb-code for the page load routine > > > > 'Put user code to initialize the page here > > Dim conPrins As New > > > SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog > > _db2") > > Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", conPrins) > > Dim dtr As SqlClient.SqlDataReader > > cmdSelect.CommandType = CommandType.StoredProcedure > > cmdSelect.Parameters.Add("@objecttag", "TI600E27") > > cmdSelect.Parameters.Add("@begintijd", "9/1/2003") > > cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") > > conPrins.Open() > > dtr = cmdSelect.ExecuteReader > > Chart1.DataSource = dtr > > 'DataGrid1.DataSource = dtr > > 'DataGrid1.DataBind() > > dtr.Close() > > conPrins.Close() > > > > Regards > > Bas Volkers > > > > > > Link to comment Share on other sites More sharing options...
Software FX Posted October 14, 2003 Report Share Posted October 14, 2003 Hello, You are right, this is the correct news group. Likely the reason why this is failing is due to ChartFX not recognizing any valid numeric value within the DataReader to chart. You should specify how each column in the table should be used by ChartFX by using the DataType method. Below I have copied some code from our passing data sample that comes with ChartFX Lite for ASP.Net. Dim myConnectionString As String Dim ds As New System.Data.DataSet() myConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("") + "..\Data\ChartfxSamples.mdb" Dim mySelectQuery As String = "SELECT Projected, Sales,peak from DemoSales" Dim myConnection As New System.Data.OleDb.OleDbConnection(myConnectionString) ds = New System.Data.DataSet("Sales") Dim adapter As New System.Data.OleDb.OleDbDataAdapter() adapter.SelectCommand = New System.Data.OleDb.OleDbCommand(mySelectQuery, myConnection) Chart1.DataType(0) = DataType.Value Chart1.DataType(1) = DataType.Value Chart1.DataType(2) = DataType.Value adapter.Fill(ds) With Chart1 .DataSource = ds.Tables(0) .Gallery = Gallery.Area 'It requires: Imports SoftwareFX.ChartFX.Lite.Gallery End With Chart1.DataBind() "Scott Leslie" <scott.leslie@sepa.org.uk> wrote in message news:3u9hiSCkDHA.3600@WEBSERVER1... > which newsgroup do we use for chartfx lite for ASP.net? > > "SFX Tech Support" <support@softwarefx.com> wrote in message > news:w8%23OjrciDHA.3600@WEBSERVER1... > > Hello, > > > > ChartFX Lite is a WindowsForms only control and can not be used in a > > webpage. > > > > JT > > Tech. Support > > > > "Bas Volkers" <basvolkers@admworld.com> wrote in message > > news:1BZlQt0gDHA.1496@WEBSERVER1... > > > I'm having problems with populating my chart. I'am using MS visual > > > studio.net for my webpage design. When I run my application I can see a > > > chart and there are no error massages. Only the chart data seems to be > > > random and not a representation of my data. If I bind the datareader to > a > > > datagrid I do see the correct data. I think there is a bug or a problem > > with > > > chartfx that it wil not bind the DataSource to a SqlDataReader?!? > > > Can you help me out here? > > > > > > here is the vb-code for the page load routine > > > > > > 'Put user code to initialize the page here > > > Dim conPrins As New > > > > > > SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog > > > _db2") > > > Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", > conPrins) > > > Dim dtr As SqlClient.SqlDataReader > > > cmdSelect.CommandType = CommandType.StoredProcedure > > > cmdSelect.Parameters.Add("@objecttag", "TI600E27") > > > cmdSelect.Parameters.Add("@begintijd", "9/1/2003") > > > cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") > > > conPrins.Open() > > > dtr = cmdSelect.ExecuteReader > > > Chart1.DataSource = dtr > > > 'DataGrid1.DataSource = dtr > > > 'DataGrid1.DataBind() > > > dtr.Close() > > > conPrins.Close() > > > > > > Regards > > > Bas Volkers > > > > > > > > > > > > Link to comment Share on other sites More sharing options...
Software FX Posted October 14, 2003 Report Share Posted October 14, 2003 Hello, You are right, this is the correct news group. Likely the reason why this is failing is due to ChartFX not recognizing any valid numeric value within the DataReader to chart. You should specify how each column in the table should be used by ChartFX by using the DataType method. Below I have copied some code from our passing data sample that comes with ChartFX Lite for ASP.Net. Dim myConnectionString As String Dim ds As New System.Data.DataSet() myConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("") + "..\Data\ChartfxSamples.mdb" Dim mySelectQuery As String = "SELECT Projected, Sales,peak from DemoSales" Dim myConnection As New System.Data.OleDb.OleDbConnection(myConnectionString) ds = New System.Data.DataSet("Sales") Dim adapter As New System.Data.OleDb.OleDbDataAdapter() adapter.SelectCommand = New System.Data.OleDb.OleDbCommand(mySelectQuery, myConnection) Chart1.DataType(0) = DataType.Value Chart1.DataType(1) = DataType.Value Chart1.DataType(2) = DataType.Value adapter.Fill(ds) With Chart1 .DataSource = ds.Tables(0) .Gallery = Gallery.Area 'It requires: Imports SoftwareFX.ChartFX.Lite.Gallery End With Chart1.DataBind() "Scott Leslie" <scott.leslie@sepa.org.uk> wrote in message news:3u9hiSCkDHA.3600@WEBSERVER1... > which newsgroup do we use for chartfx lite for ASP.net? > > "SFX Tech Support" <support@softwarefx.com> wrote in message > news:w8%23OjrciDHA.3600@WEBSERVER1... > > Hello, > > > > ChartFX Lite is a WindowsForms only control and can not be used in a > > webpage. > > > > JT > > Tech. Support > > > > "Bas Volkers" <basvolkers@admworld.com> wrote in message > > news:1BZlQt0gDHA.1496@WEBSERVER1... > > > I'm having problems with populating my chart. I'am using MS visual > > > studio.net for my webpage design. When I run my application I can see a > > > chart and there are no error massages. Only the chart data seems to be > > > random and not a representation of my data. If I bind the datareader to > a > > > datagrid I do see the correct data. I think there is a bug or a problem > > with > > > chartfx that it wil not bind the DataSource to a SqlDataReader?!? > > > Can you help me out here? > > > > > > here is the vb-code for the page load routine > > > > > > 'Put user code to initialize the page here > > > Dim conPrins As New > > > > > > SqlClient.SqlConnection("server=prins;uid=sa;pwd=telperion;database=wpi_koog > > > _db2") > > > Dim cmdSelect As New SqlClient.SqlCommand("sp_procesvaluetrend", > conPrins) > > > Dim dtr As SqlClient.SqlDataReader > > > cmdSelect.CommandType = CommandType.StoredProcedure > > > cmdSelect.Parameters.Add("@objecttag", "TI600E27") > > > cmdSelect.Parameters.Add("@begintijd", "9/1/2003") > > > cmdSelect.Parameters.Add("@eindtijd", "9/2/2003") > > > conPrins.Open() > > > dtr = cmdSelect.ExecuteReader > > > Chart1.DataSource = dtr > > > 'DataGrid1.DataSource = dtr > > > 'DataGrid1.DataBind() > > > dtr.Close() > > > conPrins.Close() > > > > > > Regards > > > Bas Volkers > > > > > > > > > > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.