|
using System;
using System.Data;
using System.Drawing;
using ReportPrinting;
namespace ReportDocumentTesting
{
/// <summary>
/// Document structure (a horizontal layout within a vertical layout).
/// </summary>
public class ReportTest9 : IReportMaker
{
public void MakeDocument(ReportDocument reportDocument)
{
TextStyle.ResetStyles();
reportDocument.DefaultPageSettings.Margins.Top = 75;
reportDocument.DefaultPageSettings.Margins.Bottom = 75;
TextStyle small = new TextStyle (TextStyle.Normal);
small.Size = 9;
ReportBuilder builder = new ReportBuilder(reportDocument);
builder.AddPageHeader ("Header", HorizontalAlignment.Center);
builder.AddPageFooter ("Page %p", String.Empty, "Footer");
builder.AddPageHeaderLine ();
builder.AddPageFooterLine ();
builder.StartColumnLayout (2, 0.1f);
builder.AddTextSection (MainForm.Text2, small);
DataView dv1 = SampleReportMaker1.GetDataView();
builder.AddDataSection (dv1, false, 2.0f, true, true);
builder.CurrentSection.MarginTop = 0.2f;
builder.CurrentSection.MarginBottom = 0.2f;
builder.AddPageBreak();
builder.AddTextSection ("Text for new page");
builder.AddColumnBreak();
builder.AddTextSection ("Text for a new column");
builder.AddColumnBreak();
builder.AddTextSection ("Text for another column which should also be a new page");
builder.FinishColumnLayout ();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.