private void
xtraReport1_ParametersRequestSubmit(object sender,
DevExpress.XtraReports.Parameters.ParametersRequestEventArgs e) {
this.detailBand1.SortFields[0].FieldName
=
((DevExpress.XtraReports.Parameters.ParameterInfo)e.ParametersInformation.GetValue(0)).Parameter.Value.ToString();
if(((DevExpress.XtraReports.Parameters.ParameterInfo)e.ParametersInformation.GetValue(1)).Parameter.Value.ToString()=="升序"
||
((DevExpress.XtraReports.Parameters.ParameterInfo)e.ParametersInformation.GetValue(1)).Parameter.Value.ToString()=="1")
{
this.detailBand1.SortFields[0].SortOrder
= XRColumnSortOrder.Ascending;
}
if(((DevExpress.XtraReports.Parameters.ParameterInfo)e.ParametersInformation.GetValue(1)).Parameter.Value.ToString()=="降序"
||
((DevExpress.XtraReports.Parameters.ParameterInfo)e.ParametersInformation.GetValue(1)).Parameter.Value.ToString()=="2")
{
this.detailBand1.SortFields[0].SortOrder
= XRColumnSortOrder.Descending;
}
}
//这里是实现系统时间的代码
private void
xtraReport1_DataSourceDemanded(object sender, System.EventArgs e) {
label10.Text=System.DateTime.Now.ToString();
}