C# 将明细表中的记录添加到报告中各个主表记录之后
我有两张账单表,一张是账单主表,另一张是账单明细表。两个表中的记录如下C# 将明细表中的记录添加到报告中各个主表记录之后,c#,.net,rdlc,dynamic-rdlc-generation,C#,.net,Rdlc,Dynamic Rdlc Generation,我有两张账单表,一张是账单主表,另一张是账单明细表。两个表中的记录如下 **BILL_MASTER** id party bill_amount 1 abc 500 2 def 600 **BILL_DETAILS** mstr_id sr_no perticular amount 1 1 lunch box 100 1 2 water bag
**BILL_MASTER**
id party bill_amount
1 abc 500
2 def 600
**BILL_DETAILS**
mstr_id sr_no perticular amount
1 1 lunch box 100
1 2 water bag 400
2 1 pencil boxes 300
2 2 a4 papers 100
2 3 staple pins 200
现在我想做一个RDLC,如下所示
**RESULT_TABLE**
mstr_id party billamount
1 abc 500
lunch box 100
water bag 400
2 def 600
pencil boxes 300
a4 papers 100
staple pins 200
我的数据库是SQLite。如何执行此操作?首先执行Sql联接以从数据集中的两个表中获取结果。创建报表清空报表右键单击报表并编辑。将此部分添加到标记中 在您完成上述工作后,请在报告上签字。将列拖放到列表中。并设置GroupBy mstr_id 还有什么事请告诉我
<DataSet Name="DataSet1">
<Fields>
<Field Name="mstr_id">
<DataField>mstr_id</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="party">
<DataField>party</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="billamount">
<DataField>billamount</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
reportViewer1.LocalReport.ReportPath = ("testReport.rdlc");
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", ds.Tables[0]));
reportViewer1.RefreshReport();