or
Name | Year | Amount |
Company A | 2009 | 5 |
Company A | 2009 | 5 |
Company B | 2009 | 5 |
Company B | 2009 | 5 |
Dim report As New myrpt
Dim adapter As New System.Data.SqlClient.SqlDataAdapter(sql, GetConnectionString())
report.DataSource = adapter
Me.ReportViewer1.Report = report
Me.ReportViewer1.RefreshReport()
SortableCollectionView)
to the server side (probably using a WCF service) to view it in Silverlight. In other words can the Silverlight viewer look at a Silverlight report or must it always be a report created in straight ASP.Net.
I'm trying to use Exec:
=Sum(Fields.Total)/Exec('rptName', Sum(Fields.Total))
to calculate %.
But I'm getting 0.
Order and Sample are the result of the grouping
If I use only = Exec('rptName', Sum(Fields.Total)) I'm getting 64.
Can someone help me, please...
private
Unit oneUnit =
new
Unit(100/8);
private
Unit originalTextSeg1Width;
private
Unit originalTextSeg2Width;
private
Unit originalTextSeg3Width;
private
Unit originalTextSeg4Width;
private
Unit originalTextSeg5Width;
private
Unit originalTextDash1X;
private
Unit originalTextDash2X;
private
Unit originalTextDash3X;
private
Unit originalTextDash4X;
private
Unit originalTextSeg2X;
private
Unit originalTextSeg3X;
private
Unit originalTextSeg4X;
private
Unit originalTextSeg5X;
public
GLIncomeStatementDT()
{
//
// Required for telerik Reporting designer support
//
InitializeComponent();
//Original Width
originalTextSeg1Width = textSeg1.Width;
originalTextSeg2Width = textSeg2.Width;
originalTextSeg3Width = textSeg3.Width;
originalTextSeg4Width = textSeg4.Width;
originalTextSeg5Width = textSeg5.Width;
//Original X location
originalTextDash1X = textDash1.Location.X;
originalTextDash2X = textDash2.Location.X;
originalTextDash3X = textDash3.Location.X;
originalTextDash4X = textDash4.Location.X;
originalTextSeg2X = textSeg2.Location.X;
originalTextSeg3X = textSeg3.Location.X;
originalTextSeg4X = textSeg4.Location.X;
originalTextSeg5X = textSeg5.Location.X;
//
textSeg1.ItemDataBound +=
new
EventHandler(textSeg1_ItemDataBound);
textSeg2.ItemDataBound +=
new
EventHandler(textSeg2_ItemDataBound);
textSeg3.ItemDataBound +=
new
EventHandler(textSeg3_ItemDataBound);
textSeg4.ItemDataBound +=
new
EventHandler(textSeg4_ItemDataBound);
textSeg5.ItemDataBound +=
new
EventHandler(textSeg5_ItemDataBound);
this
.DataSource =
null
;
this
.NeedDataSource +=
new
EventHandler(FilteredReport_NeedDataSource);
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Setup Seg's Width dynamically
void
textSeg5_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox textSeg5Position = (Telerik.Reporting.Processing.TextBox)sender;
textSeg5.Style.BackgroundColor = Color.Purple;
textSeg5.Width = originalTextSeg5Width * (textSeg5Position.Text.Length);
}
void
textSeg4_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox textSeg4Position = (Telerik.Reporting.Processing.TextBox)sender;
textSeg4.Style.BackgroundColor = Color.Yellow;
textSeg4.Width = originalTextSeg4Width * (textSeg4Position.Text.Length);
textDash4.Location =
new
PointU() { X = originalTextDash4X + textSeg4.Width - oneUnit, Y = textDash4.Location.Y };
textSeg5.Location =
new
PointU() { X = originalTextSeg5X + textSeg4.Width - oneUnit, Y = textSeg5.Location.Y };
}
void
textSeg3_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox textSeg3Position = (Telerik.Reporting.Processing.TextBox)sender;
textSeg3.Style.BackgroundColor = Color.Green;
textSeg3.Width = originalTextSeg3Width * (textSeg3Position.Text.Length);
textDash3.Location =
new
PointU() { X = originalTextDash3X + textSeg3.Width - oneUnit, Y = textDash3.Location.Y };
textSeg4.Location =
new
PointU() { X = originalTextSeg4X + textSeg3.Width - oneUnit, Y = textSeg4.Location.Y };
textDash4.Location =
new
PointU() { X = originalTextDash4X + textSeg3.Width - oneUnit, Y = textDash4.Location.Y };
textSeg5.Location =
new
PointU() { X = originalTextSeg5X + textSeg3.Width - oneUnit, Y = textSeg5.Location.Y };
}
void
textSeg2_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox textSeg2Position = (Telerik.Reporting.Processing.TextBox)sender;
textSeg2.Style.BackgroundColor = Color.Blue;
textSeg2.Width = originalTextSeg2Width * (textSeg2Position.Text.Length);
textDash2.Location =
new
PointU() { X = originalTextDash2X + textSeg2.Width - oneUnit, Y = textDash2.Location.Y };
textSeg3.Location =
new
PointU() { X = originalTextSeg3X + textSeg2.Width - oneUnit, Y = textSeg3.Location.Y };
textDash3.Location =
new
PointU() { X = originalTextDash3X + textSeg2.Width - oneUnit, Y = textDash3.Location.Y };
textSeg4.Location =
new
PointU() { X = originalTextSeg4X + textSeg2.Width - oneUnit, Y = textSeg4.Location.Y };
textDash4.Location =
new
PointU() { X = originalTextDash4X + textSeg2.Width - oneUnit, Y = textDash4.Location.Y };
textSeg5.Location =
new
PointU() { X = originalTextSeg5X + textSeg2.Width - oneUnit, Y = textSeg5.Location.Y };
}
void
textSeg1_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.TextBox textSeg1Position = (Telerik.Reporting.Processing.TextBox)sender;
textSeg1.Style.BackgroundColor = Color.Red;
textSeg1.Width = originalTextSeg1Width * (textSeg1Position.Text.Length);
textDash1.Location =
new
PointU() { X = originalTextDash1X + textSeg1.Width - oneUnit, Y = textDash1.Location.Y };
textSeg2.Location =
new
PointU() { X = originalTextSeg2X + textSeg1.Width - oneUnit, Y = textSeg2.Location.Y };
textDash2.Location =
new
PointU() { X = originalTextDash2X + textSeg1.Width - oneUnit, Y = textDash2.Location.Y };
textSeg3.Location =
new
PointU() { X = originalTextSeg3X + textSeg1.Width - oneUnit, Y = textSeg3.Location.Y };
textDash3.Location =
new
PointU() { X = originalTextDash3X + textSeg1.Width - oneUnit, Y = textDash3.Location.Y };
textSeg4.Location =
new
PointU() { X = originalTextSeg4X + textSeg1.Width - oneUnit, Y = textSeg4.Location.Y };
textDash4.Location =
new
PointU() { X = originalTextDash4X + textSeg1.Width - oneUnit, Y = textDash4.Location.Y };
textSeg5.Location =
new
PointU() { X = originalTextSeg5X + textSeg1.Width - oneUnit, Y = textSeg5.Location.Y };
}