This is a migrated thread and some comments may be shown as answers.

VB.NET Documentation

2 Answers 184 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John S.
Top achievements
Rank 1
John S. asked on 05 Jan 2010, 07:40 AM
Hello,

In general I am very please with telerik; however, it seems like VB.NET is an afterthought in regards to samples...

The following is the code supplied for VB.NET to connect a chart to a datasource and seems useless as far as correct code....not that it can't be modified but just a bit annoying.

This is from ms-help://telerik.reporting.3.2/Reporting/BuildingDatabindDatabase.html

Imports System  
Imports Telerik.Reporting.Chart  
 
Public Partial Class Report1  
 Inherits Report  
 Public Sub New()  
  """ <summary>  
  """ Required for telerik Reporting designer support  
  """ </summary>  
  InitializeComponent()  
 
    End Sub 
 Private Sub chart1_NeedDataSource(sender As Object, e As System.EventArgs)  
 " create a datasource  
   Dim sqlDataSource As New SqlDataSource()  
   sqlDataSource.ID = "myDataSource" 
   sqlDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString  
   sqlDataSource.SelectCommand = "SELECT CategoryName, SUM(ProductSales) AS TotalSales FROM [Product Sales for 1997] GROUP BY CategoryName" 
 Dim procChart As Telerik.Reporting.Processing.Chart = DirectCast(sender, Telerik.Reporting.Processing.Chart)  
 procChart.DataSource = "myDataSource" 
" Set the column for data and data labels:
 " Each bar will show "TotalSales", each label along  
 " X-axis will show "CategoryName.  
 chart1.Series(0).DataYColumn = "TotalSales'
 chart1.PlotArea.XAxis.DataLabelsColumn = 'CategoryName'
 " assign appearance related properties  
 chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 300  
 chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.BlueViolet  
 chart1.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Reporting.Charting.Styles.Unit.Percentage(30)  
 
End Sub 
End Sub 
 End Class 


John

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Jan 2010, 08:39 AM
Hi John,

That specific help article has been updated for the Q3 release, so you must be looking at an old version of the documentation. You can always find the most current documentation on our web site or download the latest chm from your account.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John S.
Top achievements
Rank 1
answered on 05 Jan 2010, 03:04 PM
Hello Steve,

Thanks for looking at this. What I posted is from the 2009 Q3 user manual that was installed with the initial release. I have not added SP1 yet.

In any case, just wanted to vent a bit about something I see frequently. As I stated before, for the most part (99%) great product and support.

Best regards,
John
Tags
General Discussions
Asked by
John S.
Top achievements
Rank 1
Answers by
Steve
Telerik team
John S.
Top achievements
Rank 1
Share this question
or