当前位置: 首页>>代码示例>>C#>>正文


C# XtraReport.ShowPreviewDialog方法代码示例

本文整理汇总了C#中XtraReport.ShowPreviewDialog方法的典型用法代码示例。如果您正苦于以下问题:C# XtraReport.ShowPreviewDialog方法的具体用法?C# XtraReport.ShowPreviewDialog怎么用?C# XtraReport.ShowPreviewDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XtraReport的用法示例。


在下文中一共展示了XtraReport.ShowPreviewDialog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowPreview

        //http://documentation.devexpress.com/#corelibraries/clsDevExpressXtraPrintingProgressReflectortopic
        public static void ShowPreview(XtraReport report)
        {
            // Create a form to show a progress bar,
            // and adjust its properties.
            Form form = new Form();
            form.FormBorderStyle = FormBorderStyle.None;
            form.Size = new System.Drawing.Size(300, 25);
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.TopMost = true;

            // Create a ProgressBar along with its ReflectorBar.
            ProgressBarControl progressBar = new ProgressBarControl();
            ReflectorBar reflectorBar = new ReflectorBar(progressBar);

            // Add a progress bar to a form and show it.
            form.Controls.Add(progressBar);
            progressBar.Dock = DockStyle.Fill;
            form.Show();

            try
            {
                // Register the reflector bar, so that it reflects
                // the state of a ProgressReflector.
                report.PrintingSystem.ProgressReflector = reflectorBar;
                report.CreateDocument();
            }
            finally
            {
                // Unregister the reflector bar, so that it no longer
                // reflects the state of a ProgressReflector.
                report.PrintingSystem.ResetProgressReflector();
                form.Close();
                form.Dispose();
            }

            // Show the preview of the created document.
            report.ShowPreviewDialog();
        }
开发者ID:Rukhlov,项目名称:DataStudio,代码行数:40,代码来源:ReportCommonMethods.cs

示例2: iBaoCao_ItemClick

        private void iBaoCao_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            XtraReport r = new XtraReport();
            r.Landscape = true;

            ReportBuilderHelper rbh = new ReportBuilderHelper();
            if(ReportList == null) { MessageBox.Show("Chọn danh sách đã!"); return; }
            rbh.Header = "Danh sách " + CurrentMDI.GetName();
            rbh.GenerateReport(r, ReportList, CurrentMDI.GetType());
            r.ShowPreviewDialog();
        }
开发者ID:HoanChan,项目名称:QuanLyCuaHangBanXe,代码行数:11,代码来源:Main.cs

示例3: ShowPreview

        /// <summary>
        /// 显示打印预览
        /// </summary>
        /// <param name="reportClass">报表类</param>
        /// <param name="data">填充数据</param>
        /// <param name="tableName">填充的数据表名称</param>
        public static void ShowPreview(XtraReport reportClass, DataSet data, string tableName)
        {
            if (reportClass == null) return;
            //如果包含填充数据则将数据绑定到报表
            reportClass.DataSource = data;
            reportClass.DataMember = tableName;
            reportClass.PrinterName = GetDefaultPrinter();
            reportClass.PrintingSystem.ShowMarginsWarning = false;

            //#region 直接打印
            //for (int i = 0; i < 2; i++)
            //{
            //    reportClass.PaperKind = System.Drawing.Printing.PaperKind.Custom;
            //    reportClass.Print();
            //}
            //#endregion
            reportClass.ShowPreviewDialog();
        }
开发者ID:JasonDevStudio,项目名称:WEBFRAME,代码行数:24,代码来源:WareCommon.cs


注:本文中的XtraReport.ShowPreviewDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。