//打印病历按钮
private void cmdPrintFisrtDoss_Execute(object sender, SimpleActionExecuteEventArgs e)
{
DevExpress.ExpressApp.ListView v = View as DevExpress.ExpressApp.ListView;
VIP_CrdInfo crd = v.CurrentObject as VIP_CrdInfo;
ReportDataV2 reportData = null;
//if (doc.DrugFeesSub.Count > 0) //处理打印处方还是费用
reportData = crd.Session.FindObject<ReportDataV2>(new BinaryOperator("DisplayName", "会员病历首页"));
//else
// reportData = doc.Session.FindObject<ReportDataV2>(new BinaryOperator("DisplayName", "西药处方模板"));
XtraReport report = ReportDataProvider.ReportsStorage.LoadReport(reportData);
BinaryOperator bc = new BinaryOperator("Oid", crd.Oid);
ReportsModuleV2 module = ReportsModuleV2.FindReportsModule(ApplicationReportObjectSpaceProvider.ContextApplication.Modules);
module.ReportsDataSourceHelper.SetupBeforePrint(report, null, bc, true, null, false);
report.CreateDocument();
report.ShowPreviewDialog();
}