Morning,
I think I might have just nailed it! 
Whilst my below code does work, please let me know if something should be done differently or could be tweaked, thanks.
Code:
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Data.OleDb;
using Telerik.Charting;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Dictionary<string, double> d = new Dictionary<string, double>();
int itemCount = 0;
string connectionString = Convert.ToString(WindowsFormsApplication1.Properties.Settings.Default.MOA_DBConnectionString);
ChartSeries chartSeries = new ChartSeries("Material Types", ChartSeriesType.Bar);
string agentName = "Admin";
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
styleCharts();
buildDAMTChart();
}
void styleCharts()
{
//Styles for Chart 1
radChart1.SkinsOverrideStyles = false;
radChart1.Appearance.Border.Color = Color.Transparent;
radChart1.Appearance.FillStyle.MainColor = Color.Transparent;
radChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.FromArgb(255, 21, 66, 139);
radChart1.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = Color.FromArgb(255, 21, 66, 139);
radChart1.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = Color.FromArgb(255, 21, 66, 139);
}
void buildDAMTChart()
{
string queryString = "SELECT Agent, MatType, SUM(RevenueValue) as TotalRevenue, [Date], Delete FROM Orders WHERE Agent=? and [Date]=? and Delete<>? GROUP BY Agent, MatType, [Date], Delete HAVING SUM(RevenueValue)>0";
OleDbConnection mConnection = new OleDbConnection(connectionString);
OleDbCommand mCommand = new OleDbCommand(queryString, mConnection);
mCommand.Parameters.AddWithValue("Agent", agentName);
mCommand.Parameters.AddWithValue("[Date]", DateTime.Today);
mCommand.Parameters.AddWithValue("Delete", true);
try
{
mConnection.Open();
OleDbDataReader reader = mCommand.ExecuteReader();
if (reader.HasRows) //check to see if there are any rows before reading
{
while (reader.Read())
{
string materialType = reader.GetString(1);
double sum = Convert.ToDouble(reader.GetDecimal(2));
d.Add(materialType, sum);
}
}
reader.Close();
mCommand.Dispose();
mConnection.Close();
}
catch (Exception ex)
{
MessageBox.Show("Connection failed\n" + ex.Message);
}
itemCount = d.Count;
chartSeries.Clear();
radChart1.PlotArea.XAxis.AutoScale = false;
radChart1.PlotArea.XAxis.AddRange(1, itemCount, 1);
int i = 0;
foreach (KeyValuePair<string, double> pair in d)
{
chartSeries.AddItem(pair.Value);
radChart1.PlotArea.XAxis[i].TextBlock.Text = pair.Key;
i = i + 1;
}
radChart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "£ Revenue";
radChart1.PlotArea.YAxis.AxisLabel.Visible = true;
radChart1.Series.Add(chartSeries);
}
}
}
Guy