namespace EUCTVIReports |
{ |
using System; |
using System.ComponentModel; |
using System.Drawing; |
using System.Windows.Forms; |
using Telerik.Reporting; |
using Telerik.Reporting.Drawing; |
/// <summary> |
/// Summary description for MostPreferredReport. |
/// </summary> |
public partial class MostPreferredReport : Telerik.Reporting.Report |
{ |
public MostPreferredReport() |
{ |
/// <summary> |
/// Required for telerik Reporting designer support |
/// </summary> |
InitializeComponent(); |
ItemDataBinding += new System.EventHandler(MostPreferredReport_ItemDataBinding); |
} |
public DataTable Source |
{ |
get |
{ |
return this.Source; |
} |
set |
{ |
this.DataSource = value; |
} |
} |
void MostPreferredReport_ItemDataBinding(object sender, System.EventArgs e) |
{ |
// SEE: http://www.telerik.com/help/reporting/faq-combine-values2.html |
//Telerik.Reporting.Processing.DetailSection section = (Telerik.Reporting.Processing.DetailSection)sender; |
//System.Data.DataRow row = (System.Data.DataRow)section.DataObject.RawData; |
//if ((row["ProductName"] != null) && (row["ProductName"].ToString().Length != 0)) |
//{ |
// Telerik.Reporting.Processing.TextBox procTextbox = (Telerik.Reporting.Processing.TextBox)section.ChildElements.Find("productNameDataTextBox", true)[0]; |
// procTextbox.Value = row["ProductCategory"].ToString() + " " + row["ProductSubCategory"].ToString(); |
//} |
} |
} |
} |
hi! I have create chart using xml data...I have use below code in chart need datasource event... I have get the output as pichart with salesorpurchasedesc column...But Now I want the output piechart with labels as itemlineamount data but this data in percentage format...and each salesorpurchase desc data left side of the pie chart that referring each itemline amount data..please help me...
chart needdatasource event
string fileName = @"D:\text\jccantera\jccantera\jcc.xml";
var reader = new StreamReader(fileName);
XmlSerializer serializer = new XmlSerializer(typeof(NewDataSet));
var report = (NewDataSet)serializer.Deserialize(reader);
Telerik.Reporting.Processing.
Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
DataSet ds = report;
procChart.DataSource = ds.Tables[
"BillItemLine"];
ChartSeries series = new ChartSeries();
series.DataYColumn =
"ItemLineAmount";
series.DataLabelsColumn =
"SalesOrPurchaseDesc";
series.Appearance.ShowLabelConnectors =
true;
JCChart.Series.Add(series);
procChart.DataSource = ds.Tables[
"BillItemLine"].DefaultView;
JCChart.DefaultType = Telerik.Reporting.Charting.
ChartSeriesType.Pie;
Xmldata
<
NewDataSet>
<
BillItemLine>
<
ItemLineAmount>844.35</ItemLineAmount>
<
ItemLineItemRefListID>350000-1247582799</ItemLineItemRefListID>
<
EstimateKey>Plan 804-1:804-1-502</EstimateKey>
<
Plan>804-1</Plan>
<
HouseAddress>3341 West Avenue, Beaumont</HouseAddress>
<
EstimateLineAmount>6000</EstimateLineAmount>
<
Name>804-1-502</Name>
<
SalesOrPurchaseDesc>Foundation Labor</SalesOrPurchaseDesc>
</
BillItemLine>
<
BillItemLine>
<
ItemLineAmount>84.87</ItemLineAmount>
<
ItemLineItemRefListID>370000-1247585073</ItemLineItemRefListID>
<
EstimateKey>Plan 804-1:804-1-633</EstimateKey>
<
Plan>804-1</Plan>
<
HouseAddress>3341 West Avenue, Beaumont</HouseAddress>
<
EstimateLineAmount>300</EstimateLineAmount>
<
Name>804-1-633</Name>
<
SalesOrPurchaseDesc>Portalet</SalesOrPurchaseDesc>
</
BillItemLine>
Hello Telerik team,
To achieve the number of records for a group footer or a Report footer we used =Count(‘fieldname’)
But I have a scenario where in I need to count only unique values for my number of records for both Group Footer and Report Footer.
For example:
I'm printing a report for leave applications
1 employee applied a 5 days leave in one transaction (The transaction was tag with an ID)
So I got 5 Rows with Same ID.
When I try to display a report it will always show me 5 records which is correct, but how do I count the unique ID? I dont want my number of record to be counted as 5 records instead I want the count of the unique ID.