.netCHARTING v10.3 Documentation
Example 


dotnetCHARTING Namespace > Series Class : SqlStatement Property
SqlStatement Property (Series)
The SQL statement used to obtain the charting data.
Syntax
'Declaration
 
Public Property SqlStatement As String
'Usage
 
Dim instance As Series
Dim value As String
 
instance.SqlStatement = value
 
value = instance.SqlStatement
public string SqlStatement {get; set;}
Remarks
The first column returned is used for the X values, and the second for the Y values. The first also has special handling if dates are returned as the DateGrouping property can be used for intelligent date handling and grouping. The third column is optional and is used only for SplitBy. When a third column is set it is used automatically to create a unique series based on each unique value in this column.

NOTE: All date values in your SQL statements should be wrapped with the pound symbol: #10/25/2002#, regardless if Access or SQL server is used. Also the #StartDate# and #EndDate# tokens can be used in which case the dates set for these properties will be set in place of the tokens before the SqlStatement is executed.
Example
series.Series.SqlStatement = "SELECT OrderDate,Total FROM Orders";
 
//If you are doing a SplitBy you would need another field to correspond to your SplitBy value i.e. 
series.Series.SqlStatement = "SELECT OrderDate,Total,Customer FROM Orders" ;
series.Series.SqlStatement = "SELECT OrderDate,Total FROM Orders"
 
'If you are doing a SplitBy you would need another field To correspond To your SplitBy value i.e. 
series.Series.SqlStatement = "SELECT OrderDate,Total,Customer FROM Orders"
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also