or
|
A |
10 |
|
|
|
|
20 |
|
|
|
A Total |
30 |
AVG |
0.25 (30/120) |
|
B |
20 |
|
|
|
|
30 |
|
|
|
|
40 |
|
|
|
B Total |
90 |
AVG |
0.75(90/120) |
|
Total |
120 |
|
|
Public Sub New() InitializeComponent()End SubPrivate Sub admin_invoice_details_ownitnow_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.NeedDataSource Dim SQL As New StringBuilder SQL.AppendLine(" SELECT ISNULL(products.itemid, 0) AS lotid,") SQL.AppendLine(" invdesc.itemdesc,") SQL.AppendLine(" invdesc.amount") SQL.AppendLine(" FROM invdesc") SQL.AppendLine(" INNER JOIN products ON products.ProductID = invdesc.itemid") SQL.AppendLine(" WHERE invdesc.invoiceid = @invoiceid") Dim sqlDataSource1 As New SqlDataSource() sqlDataSource1.ConnectionString = HttpContext.Current.Session("Conn") sqlDataSource1.SelectCommand = SQL.ToString sqlDataSource1.Parameters.Add("@invoiceid", DbType.Int32, "=Parameters.invoiceid") Me.DataSource = sqlDataSource1End Subprivate void Zoom(object param)
{
ReportChildWindow reportChildWindow = new ReportChildWindow(this.ReportViewer.DataContext);
reportChildWindow.Show();
}
public ReportChildWindow(object dataContext)
{
this.DataContext = dataContext;
InitializeComponent();
}
Private Sub tblSolution1_ItemDataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles tblSolution1.ItemDataBinding Try Dim ds As New DataSet Dim dc As DataColumn Dim newDT As New DataTable 'Changes datatable layout newDT = RestructureDataTable(MyDatatable) ds.Tables.Add(newDT) Dim processingTable As Telerik.Reporting.Processing.Table = sender Dim textboxGroup As Telerik.Reporting.TextBox Dim textBoxTable As Telerik.Reporting.TextBox Dim I As Integer I = 0 tblSolution1.ColumnGroups.Clear() tblSolution1.Body.Columns.Clear() tblSolution1.Body.Rows.Clear() Dim tableGroupColumn As Telerik.Reporting.TableGroup Dim tableGroupRow As Telerik.Reporting.TableGroup For Each dc In ds.Tables(0).Columns tableGroupColumn = New Telerik.Reporting.TableGroup tblSolution1.Body.Columns.Add(New Telerik.Reporting.TableBodyColumn(Unit.Inch(0.5))) textboxGroup = New Telerik.Reporting.TextBox textboxGroup.Value = dc.ColumnName.ToString textboxGroup.Size = New SizeU(Unit.Inch(1.2), Unit.Inch(0.3)) tableGroupColumn.ReportItem = textboxGroup tblSolution1.ColumnGroups.Add(tableGroupColumn) textBoxTable = New Telerik.Reporting.TextBox textBoxTable.Value = "=Fields." + dc.ColumnName textBoxTable.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid textBoxTable.Style.BorderWidth.Default = Unit.Pixel(1) tblSolution1.Body.SetCellContent(0, I, textBoxTable) I = I + 1 Next tableGroupRow = New Telerik.Reporting.TableGroup tblSolution1.RowGroups.Add(tableGroupRow) tableGroupRow.Grouping.Add(New Telerik.Reporting.Data.Grouping) processingTable.DataSource = ds.Tables(0) Catch ex As Exception MsgBox(ex.ToString) End Try End Sub