我有問題要獲得特定日期之間的報告。我想選擇而purchaseDate日期範圍,但是當我選擇日期範圍,我看到所有購買日期...獲取報告FromDate ToDate
private void barButtonItem1_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
XtraReport1 report = new XtraReport1();
// Create a parameter and specify its name.
Parameter param1 = new Parameter();
param1.Name = "FromDate:";
param1.Type = typeof(System.DateTime);
param1.Description = "FromDate:";
param1.Visible = true;
Parameter param2 = new Parameter();
param2.Name = "ToDate";
param2.Type = typeof(System.DateTime);
param2.Description = "ToDate: ";
param2.Visible = true;
report.Parameters.Add(param1);
report.Parameters.Add(param2);
report.FilterString = "[PurchaseDate] Between(?FromDate,?ToDate)";
report.RequestParameters = false;
ReportPrintTool pt = new ReportPrintTool(report);
pt.AutoShowParametersPanel = true;
pt.ShowPreviewDialog();
}
請不要在標題中包含languge標籤,除非在沒有它的情況下沒有意義。標籤用於此目的。 –