private XPObjectSource CreateDataSource() { XPObjectSource dataSource = new XPObjectSource() { ConnectionStringName = "nwind" }; dataSource.SetEntityType(typeof(Products)); return(dataSource); }
private XPObjectSource CreateDataSource() { ReflectionDictionary dictionary = new ReflectionDictionary(); XPClassInfo classInfo = dictionary.QueryClassInfo(typeof(Products)); XPObjectSource dataSource = new XPObjectSource() { ConnectionStringName = "nwind", EntityType = classInfo }; return(dataSource); }
private void simpleButton4_Click(object sender, EventArgs e) { XtraReport1 report = new XtraReport1(); XPObjectSource dataSource = (XPObjectSource)report.DataSource; dataSource.ResolveSession += new EventHandler <ResolveSessionEventArgs>(OnResolveSession); dataSource.DismissSession += new EventHandler <ResolveSessionEventArgs>(OnDismissSession); ReportPrintTool printTool = new ReportPrintTool(report); printTool.ShowPreviewDialog(); }