0
我有兩個數據庫表加盟微軟報表查看器(SSRS 2012)
發票表兩張表(PK InvoiceNo)
InvoiceDate | InvoiceNo | Name | Class | AmountPaid
2014-6-5 | B001 | ABC | E1 | 1500.00
2014-6-5 | B002 | BCD | E1 | 2000.00
2014-6-5 | B003 | CDE | E3 | 1000.00
2014-6-5 | B004 | ABC | E3 | 3000.00
2014-6-6 | B005 | BCD | E2 | 5000.00
2014-6-6 | B006 | CCD | E1 | 2000.00
筆開支表(PK日期,說明)
Date | Description | Cost
2014-6-5 | Lunch | 150.00
2014-6-5 | SoftDrink | 50.00
2014-6-6 | BusFair | 10.00
我想用這兩個表格創建一個報表。我想到的是
InvoiceDate | InvoiceNo | Name | Class | AmountPaid | Description | Cost
2014-6-5 | B001 | ABC | E1 | 1500.00 | Lunch | 150.00
| B002 | BCD | E1 | 2000.00 | SoftDrink | 50.00
| B003 | CDE | E3 | 1000.00 |
| B004 | ABC | E3 | 3000.00 |
2014-6-6 | B005 | BCD | E2 | 5000.00 | BusFair | 10.00
| B006 | CCD | E1 | 2000.00 |
但我的輸出看起來像這樣
InvoiceDate | InvoiceNo | Name | Class | AmountPaid | Description | Cost
2014-6-5 | B001 | ABC | E1 | 1500.00 | Lunch | 150.00
| B002 | BCD | E1 | 2000.00 | Lunch | 150.00
| B003 | CDE | E3 | 1000.00 | Lunch | 150.00
| B004 | ABC | E3 | 3000.00 | Lunch | 150.00
| B001 | ABC | E1 | 1500.00 | SoftDrink | 50.00
| B002 | BCD | E1 | 2000.00 | SoftDrink | 50.00
| B003 | CDE | E3 | 1000.00 | SoftDrink | 50.00
| B004 | ABC | E3 | 3000.00 | SoftDrink | 50.00
2014-6-6 | B005 | BCD | E2 | 5000.00 | BusFair | 10.00
| B006 | CCD | E1 | 2000.00 | BusFair | 10.00
請幫我解決這個問題...
非常感謝Kyzen先生。我做的。謝謝你的意見。 – user3134334