Example #1
0
        private XPObjectSource CreateDataSource()
        {
            XPObjectSource dataSource = new XPObjectSource()
            {
                ConnectionStringName = "nwind"
            };

            dataSource.SetEntityType(typeof(Products));
            return(dataSource);
        }
Example #2
0
        private XPObjectSource CreateDataSource()
        {
            ReflectionDictionary dictionary = new ReflectionDictionary();
            XPClassInfo          classInfo  = dictionary.QueryClassInfo(typeof(Products));
            XPObjectSource       dataSource = new XPObjectSource()
            {
                ConnectionStringName = "nwind",
                EntityType           = classInfo
            };

            return(dataSource);
        }
Example #3
0
        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();
        }