Sql Devexpress钻取报告-将每个案例显示的记录数限制为1
我试图做一个钻取报告,用户点击一年,然后得到另一个屏幕,显示该年的月度数据。我的代码中有一个错误,因为“EcoYear”不在与我的主报告关联的存储过程中。我可以将包含EcoYear的表添加到存储过程中,但是每个案例都会打印15页。(每宗案件的刑期为15年) 以下是调试时出现错误的代码:Sql Devexpress钻取报告-将每个案例显示的记录数限制为1,sql,devexpress,xtrareport,Sql,Devexpress,Xtrareport,我试图做一个钻取报告,用户点击一年,然后得到另一个屏幕,显示该年的月度数据。我的代码中有一个错误,因为“EcoYear”不在与我的主报告关联的存储过程中。我可以将包含EcoYear的表添加到存储过程中,但是每个案例都会打印15页。(每宗案件的刑期为15年) 以下是调试时出现错误的代码: using System; using System.Data; using System.Drawing; using System.Windows.Forms; using System.Collection
using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Drawing.Printing;
namespace StdEco
{
public partial class StdEcoRpt : DevExpress.XtraReports.UI.XtraReport
{
public StdEcoRpt()
{
InitializeComponent();
}
private void xrLabel1_BeforePrint(object sender, PrintEventArgs e)
{
((XRLabel)sender).Tag = GetCurrentRow();
}
private void xrLabel1_PreviewClick(object sender, PreviewMouseEventArgs e)
{
DetailReport detailReport = new DetailReport();
detailReport.CaID.Value = (int)((DataRowView)e.Brick.Value).Row["CaseID"];
detailReport.EYear.Value = (int)((DataRowView)e.Brick.Value).Row["EcoYear"];
detailReport.ShowPreviewDialog();
}
private void xrLabel1_PreviewMouseMove(object sender, PreviewMouseEventArgs e)
{
Cursor.Current = Cursors.Hand;
}
}
}
错误是:列“EcoYear”不属于表StdEcoMonthlyHeaderFooter
我从现在开始得到的表格是StdEcoMonthlyData
我要么需要能够将该代码连接到StdEcoMonthlyData存储过程,要么在将EcoYear添加到StdEcoMonthlyHeaderFooter存储过程时,以某种方式每个案例只打印一条记录
谢谢您的帮助。有没有办法让参数比较不同的数据成员?该报告附加到StdEcoMonthlyHeaderFooter,因此我假设它正在尝试比较来自该数据成员的值,但是我希望它与EcoDate所在的StdEcoMonthlyData进行比较;至(int)e.Brick.TextValue;问题解决了。