Repeat Header / Keep Header Visible in Tables in RS 2008 – Advanced Reporting Serv
17-Jun-1010 Leave a comment
IT and business subjects
17-Jun-1010 Leave a comment
26-Apr-1010 Leave a comment
20-Apr-1010 Leave a comment
09-Apr-1010 Leave a comment
/*
Based on a table Product.Products and Product.BillOfMaterials.
*/
/*
SELECT * FROM Product.Products WHERE ID = 738
SELECT * FROM Product.vBillOfMaterials WHERE ProductAssemblyID = 738 ORDER BY BOMLevel
SELECT * FROM Product.vBillOfMaterialsName WHERE ProductAssemblyID = 738 ORDER BY BOMLevel
*/
CREATE VIEW [Product].[vBillOfMaterials]
AS
WITH BOM_cte
AS
(
SELECT b.ProductID AS ProductAssemblyID, ID, ProductID, ComponentID, ItemNo, Quantity, LastUpdate, LastUpdateBy, AlternativeAccy, 0 AS BOMLevel
FROM Product.BillOfMaterials b
UNION ALL
SELECT cte.ProductAssemblyID, b.ID, b.ProductID, b.ComponentID, b.ItemNo, b.Quantity, b.LastUpdate, b.LastUpdateBy, b.AlternativeAccy, BOMLevel + 1 AS BOMLevel
FROM [BOM_cte] cte
INNER JOIN [Product].[BillOfMaterials] b
ON b.ProductID = cte.[ComponentID]
)
SELECT BOM.* FROM BOM_cte BOM
27-Mar-1010 Leave a comment
24-Mar-1010 Leave a comment
24-Mar-1010 Leave a comment
22-Feb-1010 Leave a comment
19-Feb-1010 Leave a comment
02-Feb-1010 Leave a comment
Private Sub DecisionBindingSource_AddingNew(ByVal sender As System.Object, ByVal e As System.ComponentModel.AddingNewEventArgs) Handles DecisionBindingSource.AddingNew
Try
Dim dNew As New Decision
dNew.DateInput = Today
dNew.IsNew = True
dNew.StatusID = Decision.StatusIDEnum.Current
'Lambda
Dim dList As IList(Of Decision) = CType(DecisionBindingSource.DataSource, IList(Of Decision))
dNew.ID = dList.Max(Function(d) d.ID) + 1
e.NewObject = dNew
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub