1

我是水晶报表的新手,无法找到如何正确列出我的订单项。我的报告将毫无问题地运行,但我的订单项会重复多次。例如,费用Dtls 中的每一行没有四个不同的行项目,而是在多个页面上重复。如果我将报表上的字段移动到标题,我只会得到一行而不是四行。我还在选项中选中了不同的记录。这是我的查询。任何帮助将不胜感激!

    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;
        }
    }
4

0 回答 0