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


C# XtraReport.CreateDocument方法代码示例

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


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

示例1: PDFActionResult

 public PDFActionResult(XtraReport report)
 {
     using (MemoryStream stream = new MemoryStream())
     {
         report.CreateDocument();
         report.ExportToPdf(stream);
         _byteArray = stream.ToArray();
     }
 }
开发者ID:emretiryaki,项目名称:Blog,代码行数:9,代码来源:PDFActionResult.cs

示例2: SetDataSource

 public void SetDataSource(XtraReport document, ImpostazioneReportDTO impostazioneReportDTO)
 {
     _document = document;
     if (_document.Pages.Count == 0)
     {
         _document.CreateDocument();
         if (impostazioneReportDTO != null && impostazioneReportDTO.FitToPage)
             _document.PrintingSystem.Document.AutoFitToPagesWidth = 1;
     }
     documentViewer1.DocumentSource = _document;
 }
开发者ID:gipasoft,项目名称:Sfera,代码行数:11,代码来源:AnteprimaReportTemplate.cs

示例3: BindReport

 public static XtraReport BindReport(ReportFile report)
 {
     //report.DataSource.WriteXmlSchema("rep.xml");
     XtraReport rep = new XtraReport();
     using (MemoryStream stream = new MemoryStream(report.Report))
     {
         rep.LoadLayout(stream);
         BindingSource bsData = new BindingSource();
         bsData.DataSource = report.DataSource;
         rep.DataSource = bsData;
         rep.CreateDocument();
         return rep;
     }
 }
开发者ID:Ravenheart,项目名称:driversolutions,代码行数:14,代码来源:ReportBinder.cs

示例4: PianoRatealeMerge

        public PianoRatealeMerge(IList<ReportRataSoggettoDTO> dataSource, CondominioDTO condominio, EsercizioDTO esercizio, PianoRatealeReportParameters parameters, ImpostazioneReportDTO impostazioneReportDTO, decimal importoTotale)
        {
            if (impostazioneReportDTO.MultiPage)
            {
                var helper = new PianoRatealeHelper(dataSource, impostazioneReportDTO);
                var columns = helper.GetColumnList(null, null, null, 1);
                var pagine = columns.Select(item => item.PrintPage).Distinct().ToList();

                IList<XtraReport> reports = new List<XtraReport>();

                foreach (var i in pagine)
                {
                    var columnsPage = columns.Where(item => item.PrintPage == i).Select(item => item.Order);
                    var dataSourcePage = dataSource.Where(item => item.NumeroRata == 0 || columnsPage.Contains(item.NumeroRata)).ToList();
                    var riparto = new PianoRatealeSinglePage(dataSourcePage, condominio, esercizio, parameters, impostazioneReportDTO, importoTotale, i, false);
                    var report = riparto.GetReport();
                    report.CreateDocument();
                    if (impostazioneReportDTO.FitToPage)
                        report.PrintingSystem.Document.AutoFitToPagesWidth = 1;
                    reports.Add(report);
                }

                _reportMerge = BaseReportContainer.GetXtraReport(impostazioneReportDTO, false);
                _reportMerge.CreateDocument();
                var pageNumber = reports[0].Pages.Count;
                for (int i = 0; i < pageNumber; i++)
                {
                    foreach (var xtraReport in reports)
                    {
                        if (xtraReport.Pages.Count > i)
                            _reportMerge.Pages.Add(xtraReport.Pages[i]);
                    }
                }

                // Reset all page numbers in the resulting document. 
                _reportMerge.PrintingSystem.ContinuousPageNumbering = true;
            }
            else
            {
                var riparto = new PianoRatealeSinglePage(dataSource, condominio, esercizio, parameters, impostazioneReportDTO, importoTotale, null, false);
                var report = riparto.GetReport();
                _reportMerge = report;
            }
        }
开发者ID:gipasoft,项目名称:Sfera,代码行数:44,代码来源:PianoRatealeMerge.cs

示例5: 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

示例6: CreateDocument

 void CreateDocument(XtraReport report) {
     if(report != null) {
         report.PrintingSystem.ClearContent();
         report.CreateDocument(true);
         report.PrintingSystem.AfterBuildPages -= PrintingSystem_AfterBuildPages;
         report.PrintingSystem.AfterBuildPages += PrintingSystem_AfterBuildPages;
     }
 }
开发者ID:sethjuarez,项目名称:DevAV,代码行数:8,代码来源:OrdersExport.cs

示例7: SetReport

 /// <summary>
 /// Set XtraReport
 /// </summary>
 /// <param name="r">Xtra report</param>
 public void SetReport(XtraReport r)
 {
     printControl1.PrintingSystem = r.PrintingSystem;
     r.CreateDocument();
     printControl1.UpdatePageView();
 }
开发者ID:,项目名称:,代码行数:10,代码来源:

示例8: NewReport

        private void NewReport()
        {
            using (XF_ReportNew form = new XF_ReportNew())
            {
                if (form.ShowDialog() == DialogResult.Yes)
                {
                    XtraReport report = new XtraReport();
                    report.CreateDocument(false);

                    using (MemoryStream stream = new MemoryStream())
                    {
                        report.SaveLayout(stream);
                        FileObject rep = new FileObject();
                        rep.FileName = form.FileName;
                        rep.FileDescription = form.FileDescription;
                        rep.FileExtension = "repx";
                        rep.FileBlob = stream.ToArray();
                        this.DbContext.Add(rep);
                        this.DbContext.SaveChanges();

                        report.DisplayName = form.FileName;
                        report.Tag = rep.FileID;

                        this.Editor.OpenReport(report);
                        this.Editor.ActiveDesignPanel.ReportState = ReportState.Opened;
                    }
                }
            }
        }
开发者ID:Ravenheart,项目名称:driversolutions,代码行数:29,代码来源:XF_ReportEditor.cs


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