Пример #1
0
        public MainWindow()
        {
            this.Title  = "Xwt Demo Application";
            this.Width  = 800;
            this.Height = 600;


            rv = new LibRdlCrossPlatformViewer.ReportViewer();
            rv.DefaultBackend = LibRdlCrossPlatformViewer.Backend.XwtWinforms;

#if DEBUG
            if (System.Environment.MachineName == "GILL-PC")
            {
                rv.LoadReport(new Uri(@"C:\Users\Peter\Projects\My-FyiReporting\Examples\SqliteExamples\SimpleTest1.rdl"));
            }
            else if (System.Environment.MachineName == "gill-desktop")
            {
                rv.LoadReport(new Uri(@"/home/peter/projects/My-FyiReporting/Examples/SqliteExamples/SimpleTest1.rdl"));
            }
#endif

            this.Content = rv;


            this.MainMenu = CreateMenu();
            this.Show();
        }
Пример #2
0
        public MainWindow()
        {
            InitializeComponent();

            // Before using any xwt code you must initialize its engine as wpf
            // See https://groups.google.com/forum/?fromgroups=#!topic/xwt-list/9d2kb4cf5GU
            Xwt.Application.Initialize(Xwt.ToolkitType.Wpf);
            Xwt.Engine.Toolkit.ExitUserCode(null);

            rv = new LibRdlCrossPlatformViewer.ReportViewer();
            rv.DefaultBackend = LibRdlCrossPlatformViewer.Backend.XwtWinforms;

            // Since this is an example I just hard code the report path. 
            // In your own application you will want to provice a method to select reports.
#if DEBUG
            if (System.Environment.MachineName == "GILL-PC")
            {
                rv.LoadReport(new Uri(@"C:\Users\Peter\Projects\My-FyiReporting\Examples\SqliteExamples\SimpleTest1.rdl"));
            }
            else if (System.Environment.MachineName == "gill-desktop")
            {
                rv.LoadReport(new Uri(@"/home/peter/projects/My-FyiReporting/Examples/SqliteExamples/SimpleTest1.rdl"));
            }
#endif

            // Here we convert the xwt VBox to a WPF Panel
            Panel w = (Panel)Xwt.Engine.WidgetRegistry.GetNativeWidget(rv);

            this.Content = w;

        }
        public MainWindow()
        {
            InitializeComponent();

            // Before using any xwt code you must initialize its engine as wpf
            // See https://groups.google.com/forum/?fromgroups=#!topic/xwt-list/9d2kb4cf5GU
            Xwt.Application.Initialize(Xwt.ToolkitType.Wpf);
            Xwt.Engine.Toolkit.ExitUserCode(null);

            rv = new LibRdlCrossPlatformViewer.ReportViewer();
            rv.DefaultBackend = LibRdlCrossPlatformViewer.Backend.XwtWinforms;

            // Since this is an example I just hard code the report path.
            // In your own application you will want to provice a method to select reports.
#if DEBUG
            if (System.Environment.MachineName == "GILL-PC")
            {
                rv.LoadReport(new Uri(@"C:\Users\Peter\Projects\My-FyiReporting\Examples\SqliteExamples\SimpleTest1.rdl"));
            }
            else if (System.Environment.MachineName == "gill-desktop")
            {
                rv.LoadReport(new Uri(@"/home/peter/projects/My-FyiReporting/Examples/SqliteExamples/SimpleTest1.rdl"));
            }
#endif

            // Here we convert the xwt VBox to a WPF Panel
            Panel w = (Panel)Xwt.Engine.WidgetRegistry.GetNativeWidget(rv);

            this.Content = w;
        }
Пример #4
0
        public MainWindow()
        {
            this.Title = "Xwt Demo Application";
            this.Width = 800;
            this.Height = 600;

            rv = new LibRdlCrossPlatformViewer.ReportViewer();
            rv.DefaultBackend = LibRdlCrossPlatformViewer.Backend.XwtWinforms;

            #if DEBUG
            if (System.Environment.MachineName == "GILL-PC")
            {
                rv.LoadReport(new Uri(@"C:\Users\Peter\Projects\My-FyiReporting\Examples\SqliteExamples\SimpleTest1.rdl"));
            }
            else if(System.Environment.MachineName == "gill-desktop")
            {
                rv.LoadReport(new Uri(@"/home/peter/projects/My-FyiReporting/Examples/SqliteExamples/SimpleTest1.rdl"));
            }
            else if (System.Environment.MachineName == "GILL-LAPTOP")
            {
                rv.LoadReport(new Uri(@"C:\Users\Peter\Projects\My-FyiReporting\Examples\SqliteExamples\SimpleTest1.rdl"));
            }
            #endif

            this.Content = rv;

            this.MainMenu = CreateMenu();
            this.Show();
        }
Пример #5
0
        private void open_Clicked(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog("Select a file");

            dlg.InitialFileName = "Some file";
            dlg.Multiselect     = false;
            dlg.Filters.Add(new FileDialogFilter("Xwt files", "*.rdl"));
            dlg.Filters.Add(new FileDialogFilter("All files", "*.*"));



            if (dlg.Run())
            {
                rv.LoadReport(new Uri(dlg.FileName), this.parameters);
            }
        }
Пример #6
0
        public MainWindow()
        {
            this.Title = "Xwt Demo Application";
            this.Width = 800;
            this.Height = 600;

            rv = new LibRdlCrossPlatformViewer.ReportViewer();
            rv.DefaultBackend = LibRdlCrossPlatformViewer.Backend.XwtWinforms;
            var path = System.IO.Path.Combine(System.Environment.CurrentDirectory, "../", "../", "../", "../", "SqliteExamples", "SimpleTest1.rdl");
            rv.LoadReport(new Uri(path));

            this.Content = rv;

            this.MainMenu = CreateMenu();
            this.Show();
        }
        public MainWindow()
        {
            this.Title  = "Xwt Demo Application";
            this.Width  = 800;
            this.Height = 600;


            rv = new LibRdlCrossPlatformViewer.ReportViewer();
            rv.DefaultBackend = LibRdlCrossPlatformViewer.Backend.XwtWinforms;
            var path = System.IO.Path.Combine(System.Environment.CurrentDirectory, "../", "../", "../", "../", "SqliteExamples", "SimpleTest1.rdl");

            rv.LoadReport(new Uri(path));

            this.Content = rv;

            this.MainMenu = CreateMenu();
            this.Show();
        }