本文整理汇总了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();
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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();
}
示例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;
}
}
示例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();
}
示例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;
}
}
}
}