【发布时间】:2018-11-25 18:54:00
【问题描述】:
在我的表单中,我有这个代码可以通过单击按钮打开我的报告:
private void btnGroupOther_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
LayoutControl lc = new LayoutControl();
lc.Dock = DockStyle.Fill;
DateEdit FirstDate = new DateEdit();
DateEdit LastDate = new DateEdit();
lc.AddItem(Resources.firstdate, FirstDate).TextVisible = true;
lc.AddItem(Resources.seconddate, LastDate).TextVisible = true;
lc.Height = 70;
this.Controls.Add(lc);
this.Dock = DockStyle.Top;
if (DevExpress.XtraEditors.XtraDialog.Show(lc, " ", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
RepProductionGroupOther report = new RepProductionGroupOther();
report.DataSource = paint.RepProductionGroupOther(Convert.ToDateTime(FirstDate.EditValue).ToString("MM/dd/yyyy"),
Convert.ToDateTime(LastDate.EditValue).ToString("MM/dd/yyyy"));
report.ShowRibbonPreviewDialog();
}
}
在我的标题报告中,我有两个xrLabel;第一个txtFirstDate 和第二个txtLastDate。我想在txtFirstDate 中显示FirstDate DateEdit 控件的值,在txtLastDate 中显示LastDate DateEdit 控件的值。
我该怎么做呢,报表的DataSource是sql存储过程。
它有两个参数:@FirstDate 和 @LastDate。
提前致谢
【问题讨论】:
标签: c# winforms devexpress