|
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 ReportTest5 : IReportMaker
{
public void MakeDocument(ReportDocument reportDocument)
{
TextStyle.ResetStyles();
ReportBuilder builder = new ReportBuilder(reportDocument);
builder.StartDocumentLayout();
builder.AddTextSection(MainForm.Text1);
//TextStyle.Normal.MarginTop = 0.05f;
builder.AddTextSection("a ");
builder.AddTextSection("bold", TextStyle.BoldStyle);
builder.AddTextSection(" word followed by one that is ");
builder.AddTextSection("underlined", TextStyle.UnderlineStyle);
TextStyle colorStyle = new TextStyle(TextStyle.Normal);
colorStyle.Brush = Brushes.RoyalBlue;
builder.AddTextSection("And we can even make text that is colored.", colorStyle);
builder.AddTextSection("And we can make text that is normal.");
builder.AddTextSection("And we can again make text that is colored.", colorStyle);
builder.AddTextSection ("More words", TextStyle.Heading1);
TextStyle.Heading1.SizeDelta += 10;
builder.CurrentSection.VerticalAlignment = VerticalAlignment.Bottom;
builder.AddTextSection (" other");
builder.CurrentSection.VerticalAlignment = VerticalAlignment.Bottom;
//builder.AddTextSection ("\nMore words");
builder.FinishDocumentLayout();
}
}
}
|
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.