我是水晶报道的新手,无法找到如何正确列出我的订单项。我的报告没有任何问题,但我的订单项会重复多次。例如,代替在expenseDtls中每行有四个不同的行项目,它们在多个页面中重复。如果我将报表上的字段移动到标题,我只会得到一行而不是四行。我还在选项中选中了选中的不同记录。这是我的查询。任何帮助都会很感激!
private void launchReport(int pKReport)
{
using (DataClasses1DataContext db = new DataClasses1DataContext())
{
var query = (from s in db.expenseHdrs
join d in db.expenseDtls on s.rptNo equals d.rptNo
where s.rptNo == pKReport
from g in db.employees
join r in db.expenseHdrs on g.pk equals r.empPk
select new { s.period, s.description, s.department, s.rptNo,
s.reimbursement, g.name, d.expDate, d.expType, d.expDesc});
CrystalReport1 cr1 = new CrystalReport1();
cr1.SetDataSource(query);
crystalReportViewer1.ReportSource = cr1;
}
}