本文整理汇总了C#中XtraReport.SaveLayout方法的典型用法代码示例。如果您正苦于以下问题:C# XtraReport.SaveLayout方法的具体用法?C# XtraReport.SaveLayout怎么用?C# XtraReport.SaveLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XtraReport
的用法示例。
在下文中一共展示了XtraReport.SaveLayout方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GivenASubreportExistsAsAFile
public void GivenASubreportExistsAsAFile()
{
_subReportFilePath = Helpers.GetNewTempFile() + ".repx";
Path.GetDirectoryName(_subReportFilePath).Should().NotBeNullOrEmpty();
var subReport = new XtraReport();
subReport.SaveLayout(_subReportFilePath);
File.Exists(_subReportFilePath).Should().BeTrue();
}
示例2: AddCollectionDataSource
private byte[] AddCollectionDataSource(byte[] content, string typeName)
{
XtraReport report = new XtraReport();
using (MemoryStream stream = new MemoryStream(content))
{
report.LoadLayout(stream);
}
report.DataSource = new CollectionDataSource() { ObjectTypeName = typeName, Name = "collectionDataSource" };
using (MemoryStream stream = new MemoryStream())
{
report.SaveLayout(stream);
return stream.ToArray();
}
}
示例3: 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;
}
}
}
}