问题2:
两个SQL语句,就要在Dataset1.xsd中建两个datatable,注意,如果这两个表有关联,必须设置关联关系
da = new OleDbDataAdapter("SELECT EmployeeId1 as EmployeeId,EmployeeName1 as EmployeeName From Employee1", cn);
da.Fill(ds1, "Employee");
da = new OleDbDataAdapter("SELECT ProductId1 as ProductId,ProductName1 as ProductName From Product1", cn);
da.Fill(ds1, "Product");
问题3:
对于dataset 实现的子报表,不需要任何特殊设置,只要是使用了dataset1中的datatable,使用同样的语句即可。
da = new OleDbDataAdapter("SELECT ProductId1 as ProductId,ProductName1 as ProductName From Product1", cn);
da.Fill(ds1, "Product");
--1的SQL语句
select createtime,parval,count(parval) as counts,(parval*count(cardno)) as sums from ks_card_waitsell where status =1 group by createtime,parval order by createtime desc