static Form1() { // The following code is required to support serialization of multiple custom objects. TypeDescriptor.AddAttributes(typeof(XPCollection), new ReportAssociatedComponentAttribute()); // The following code is required to serialize custom objects. ReportExtension.RegisterExtensionGlobal(new ReportExtension()); ReportDesignExtension.RegisterExtension(new DesignExtension(), ExtensionName); string fileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\person.mdb"; if (!File.Exists(fileName)) { UnitOfWork session = CreateSessionByName("person.mdb"); if (new XPCollection <Person>(session).Count < 6) { Person.Create(session, "Name1"); Person.Create(session, "Name2"); Person.Create(session, "Name3"); Person.Create(session, "Name4"); Person.Create(session, "Name5"); Person.Create(session, "Name6"); session.CommitChanges(); } } }
static XtraReportBase() { ParametersRequestExtension.RegisterExtension(new TimePeriodParametersExtention(), "DependentEditorsReport"); ReportDesignExtension.RegisterExtension(new TimePeriodDesignExtention(), "DependentEditorsReport"); }
private void createReportWhithDataSourceButton_Click(object sender, EventArgs e) { using (UnitOfWork session = CreateSessionByName("person.mdb")) { XtraReport report = new XtraReport(); ReportDesignExtension.AssociateReportWithExtension(report, ExtensionName); report.DataSource = CreateDataSource(session); report.ShowDesignerDialog(); } }
static Form1() { // The following code is required to support serialization of multiple custom objects. TypeDescriptor.AddAttributes(typeof(DataSet), new ReportAssociatedComponentAttribute()); TypeDescriptor.AddAttributes(typeof(OleDbDataAdapter), new ReportAssociatedComponentAttribute()); // The following code is required to serialize custom objects. ReportExtension.RegisterExtensionGlobal(new ReportExtension()); ReportDesignExtension.RegisterExtension(new DesignExtension(), ExtensionName); }
public Form1() { InitializeComponent(); FillDataSource(); XPCollection <Person> dataSource = new XPCollection <Person>(); report = new XtraReport(); report.DataSource = dataSource; ReportDesignExtension.AssociateReportWithExtension(report, TeamParameterName); }
public XtraReportBase() { ParametersRequestExtension.AssociateReportWithExtension(this, "DependentEditorsReport"); ReportDesignExtension.AssociateReportWithExtension(this, "DependentEditorsReport"); Parameter startDateParameter = CreateParameter(startDateParameterName, typeof(DateTime), "Start Date:", CreateCorrector(defaultTimePeriod).Correct(DateTime.Now)); Parameter endDateParameter = CreateParameter(endDateParameterName, typeof(DateTime), "End Date:", DateTime.Now); Parameter periodParameter = CreateParameter(periodParameterName, typeof(TimePeriod), "Last Time Span:", defaultTimePeriod); Parameters.AddRange(new Parameter[] { startDateParameter, endDateParameter, periodParameter }); }
public virtual XafReport LoadXtraReport(IObjectSpace objectSpace) { XafReport result = CreateReport(); result.ObjectSpace = objectSpace; if ((Content != null) && (Content.Length > 0)) { int realLength = Content.Length; while (Content[realLength - 1] == 0) { realLength--; } MemoryStream stream = new MemoryStream(Content, 0, realLength); result.CustomDeserializeValue += new EventHandler <CustomDeserializeValueEventArgs>(result_CustomDeserializeValue); result.LoadLayout(stream); ReportDesignExtension.AssociateReportWithExtension(result, XafReport.XafReportContextName); stream.Close(); } result.ReportName = reportName; return(result); }
static Form1() { ReportDesignExtension.RegisterExtension(new CustomReportExtension(), TeamParameterName); }
static Form1() { ReportDesignExtension.RegisterExtension(new CustomReportExtension(), TeamParameterName); CustomReportStorageExtension.RegisterExtensionGlobal(new CustomReportStorageExtension()); }
//static void Main(string [] args) static void Main() { #if (DEBUG) Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); #endif //if (args.Length == 0) //{ Application.EnableVisualStyles(); DevExpress.UserSkins.BonusSkins.Register(); DevExpress.Skins.SkinManager.EnableFormSkins(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string applicationStyle = CustomApplicationSettings.Instance.ApplicationStyle; DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.CDSSkin).Assembly); DevExpress.XtraSplashScreen.SplashScreenManager.RegisterUserSkins(typeof(DevExpress.UserSkins.CDSSkin).Assembly); if (applicationStyle.Length == 0) { DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("CDS Blue"); } else { DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(applicationStyle); } //DevExpress.Utils.AppearanceObject.DefaultFont = new Font("Courier New", 10); //DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Office 2010 Silver"); DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font(CustomApplicationSettings.Instance.FontType, CustomApplicationSettings.Instance.FontSize); //Apply Windows 8 Style //DevExpress.LookAndFeel.UserLookAndFeel.Default.UseDefaultLookAndFeel = false; //DevExpress.LookAndFeel.UserLookAndFeel.Default.UseWindowsXPTheme = false; //DevExpress.LookAndFeel.UserLookAndFeel.Default.Style = LookAndFeelStyle.Skin; //DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = "Metropolis"; // Set up the culture that determines the datetime format etc. System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-us", true); culture.NumberFormat.CurrencyDecimalDigits = 2; culture.NumberFormat.CurrencyDecimalSeparator = "."; culture.NumberFormat.CurrencySymbol = ""; culture.DateTimeFormat.ShortDatePattern = "yyyy/MM/dd"; culture.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday; System.Threading.Thread.CurrentThread.CurrentCulture = culture; DevExpress.Utils.FormatInfo.AlwaysUseThreadFormat = true; reportStorage = new Reporting.Report.Extensions.ReportExtension(); designExtension = new Reporting.Report.Extensions.DesignExtension(); ReportStorageExtension.RegisterExtensionGlobal(ReportStorage); ReportDesignExtension.RegisterExtension(DesignExtension, "Custom"); ReportTemplateExtension.RegisterExtensionGlobal(new Reporting.Report.Templates.CustomTemplateExtension()); ConfigureExceptionHandling(); CreateUpdateTrayIcon(); Signin(); //} //else if (args[0] == "-show-app-list") //{ // Application.EnableVisualStyles(); // DevExpress.UserSkins.BonusSkins.Register(); // DevExpress.Skins.SkinManager.EnableFormSkins(); // Application.EnableVisualStyles(); // Application.SetCompatibleTextRenderingDefault(false); // Xceed.Grid.Licenser.LicenseKey = "GRD36AUKKUZ4A75Y8CA"; // DevExpress.LookAndFeel.UserLookAndFeel.Default.UseDefaultLookAndFeel = false; // DevExpress.LookAndFeel.UserLookAndFeel.Default.UseWindowsXPTheme = false; // DevExpress.LookAndFeel.UserLookAndFeel.Default.Style = LookAndFeelStyle.Skin; // DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = "Metropolis"; // AppLauncher launcher = new AppLauncher(); // launcher.Location = new System.Drawing.Point((Cursor.Position.X - (launcher.Width / 2) < 0) ? 10 : Cursor.Position.X - (launcher.Width / 2), ((Screen.PrimaryScreen.Bounds.Height) - (new Taskbar()).Bounds.Height) - launcher.Height- 10); // Application.Run(launcher); // //Cursor.Position = new System.Drawing.Point(Cursor.Position.X, (Screen.PrimaryScreen.Bounds.Height) - (new Taskbar()).Bounds.Height); //} }
void OnDesignPanelLoaded(object sender, DevExpress.XtraReports.UserDesigner.DesignerLoadedEventArgs e) { ReportDesignExtension.AssociateReportWithExtension((XtraReport)e.DesignerHost.RootComponent, ExtensionName); }