I'm having a bad time to prepare a rdlc report to show the report in the predefined format given by my client.
Client delivered format
As you can see the red background, my problem is field, item "A" has been changed three times And accordingly, their sale, rupture and return amount are shown. I have 4 table products, sales logs, breaks, sales ritons. The product table contains the latest (current) value of an item, but sell lodge, breaks, and sales retranslate table prices, breakages and sales give value at the time of return. I've written questions for SalesLog, Breaks and Sales Reitons that show rows according to product code, price, and quantity. But I do not know how can I merge their (4 table output) output to show results below.
Questions for sale
SELECT [product]. PCode AS code, [Product]. PNM AS item, SalesLag [Value] AS value, COUNT (*) AS quantity, SM (sales lodge. [Value]) Join total SalesLog Inner [product] on [product] .pCode = SalesLog.ProductCode Where BillDate = '07 / 01/2010 ' [Product] .pCode by group, [product] .pName, SalesLog. [Value] Value for value, COUNT (*) AS quantity, question for breaks
SELECT [ Product]. Join PCode AS code, [product] yoga (breakdown [value]) from within breakdown as total [product] .pCode = Breakages.ProductCode Where BillDate = '07 / 01/2010 'Group By [product] .pcode, [product] .pName [product], breaks. [Value] Questions for sales ritter
SELECT [product] [value] AS value, (*) AS [PRODUCT]] [product] .pCode = Breakages.ProductCode on INNER Zone [Product] by total breakdown as quantity, SM (breakage. [Value]) Where [product] by [Bill], [pcode] [,] by BillDate = '07 / 01/2010 ' Product] .pName, breakdown [Price] Product Table [
Make Table [DBO]. [Product] ([productive] [int] identification (1,1) no tap, [pnm] [envary] (30) calllet SQL_Latin1_General_CP1_CI_AS zero, [pSize] [int] zero, [pPrice] [decimal] (10, 2 ) Zero, [pPackQty] [int] zero, [pGroup] [int] zero, [pCode] [int] zero, [openStock] [int] zero, [CloseStock] [int] zero, [YrlyOpenStock] [int] zero [Primary] Will anyone help me with [primary]) on [primary]? [Primary] clause [PK_Products] Primary key cluster ([productId] ASC) (PAD_INDEX = closed, IGNORE_DUP_KEY = closed) Can, or give any suggestions to complete it.
Thanks in advance .....
It's just above my head From your data I feel that I will only remove a unique list of "code", "item", "value", and then use your unique list of each of your questions (sales, breakage, returns) To leave for If you are zero then you can use a fusion to make the values default, and you can use the last where all 3 results can be used to leave a record with zero (unless You do not want to show that no given value).
Comments
Post a Comment