Search Results for

    Show / Hide Table of Contents

    Class PreparedPages

    Represents the pages of a prepared report.

    Inheritance
    System.Object
    PreparedPages
    Namespace: FastReport.Preview
    Assembly: FastReport.Base.dll
    Syntax
    public class PreparedPages : IDisposable
    Remarks

    Prepared page is a page that you can see in the preview window. Prepared pages can be accessed via PreparedPages property.

    The common scenarios of using this object are:

    • Working with prepared pages after the report is finished: load (Load(String)) or save (Save(String)) pages from/to a .fpx file, get a page with specified index to work with its objects (GetPage(Int32)); modify specified page (ModifyPage(Int32, ReportPage)).
    • Using the AddPage(ReportPage), AddSourcePage(ReportPage), AddBand(BandBase) methods while report is generating to produce an output.

    Constructors

    PreparedPages(Report)

    Creates the pages of a prepared report

    Declaration
    public PreparedPages(Report report)
    Parameters
    Type Name Description
    Report report

    Properties

    AddPageAction

    Specifies an action that will be performed on AddPage(ReportPage) method call.

    Declaration
    public AddPageAction AddPageAction { get; set; }
    Property Value
    Type Description
    AddPageAction

    CanUploadToCache

    Gets or sets a value indicating whether the prepared pages can be uploaded to the file cache.

    Declaration
    public bool CanUploadToCache { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This property is used while report is generating.

    Default value for this property is true. That means the prepared pages may be uploaded to the file cache if needed. To prevent this (for example, if you need to access some objects on previously generated pages), set the property value to false.

    Count

    Gets the number of pages in the prepared report.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    OutlineXml

    Gets the XML for rendering the outline of the report

    Declaration
    public XmlItem OutlineXml { get; }
    Property Value
    Type Description
    XmlItem

    Methods

    AddBand(BandBase)

    Prints a band with all its child objects.

    Declaration
    public bool AddBand(BandBase band)
    Parameters
    Type Name Description
    BandBase band

    The band to print.

    Returns
    Type Description
    System.Boolean

    true if band was printed; false if it can't be printed on current page due to its PrintOn property value.

    Remarks

    Call the AddPage(ReportPage) method before adding a band.

    AddPage(ReportPage)

    Adds a new page.

    Declaration
    public void AddPage(ReportPage page)
    Parameters
    Type Name Description
    ReportPage page

    The original (template) page to add.

    Remarks

    Call the AddSourcePage(ReportPage) method before adding a page. This method creates a new output page with settings based on page parameter.

    AddSourcePage(ReportPage)

    Adds a source page to the prepared pages dictionary.

    Declaration
    public void AddSourcePage(ReportPage page)
    Parameters
    Type Name Description
    ReportPage page

    The template page to add.

    Remarks

    Call this method before using AddPage and AddBand methods. This method adds a page to the dictionary that will be used to decrease size of the prepared report.

    Clear()

    Clears the prepared report's pages.

    Declaration
    public void Clear()

    CopyPage(Int32)

    Creates a copy of a page with specified index and inserts it after original one.

    Declaration
    public void CopyPage(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of original page.

    Dispose()

    Declaration
    public void Dispose()

    GetPage(Int32)

    Gets a page with specified index.

    Declaration
    public ReportPage GetPage(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Zero-based index of page.

    Returns
    Type Description
    ReportPage

    The page with specified index.

    GetPageSize(Int32)

    Gets the size of specified page, in pixels.

    Declaration
    public SizeF GetPageSize(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of page.

    Returns
    Type Description
    SizeF

    the size of specified page, in pixels.

    Load(Stream)

    Loads prepared pages from a stream.

    Declaration
    public void Load(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to load from.

    Load(String)

    Loads prepared pages from a .fpx file.

    Declaration
    public void Load(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file to load from.

    ModifyPage(Int32, ReportPage)

    Replaces the prepared page with specified one.

    Declaration
    public void ModifyPage(int index, ReportPage newPage)
    Parameters
    Type Name Description
    System.Int32 index

    The index of prepared page to replace.

    ReportPage newPage

    The new page to replace with.

    ModifyPageSize(String)

    Modify the prepared page with new sizes.

    Declaration
    public void ModifyPageSize(string name)
    Parameters
    Type Name Description
    System.String name

    The name of prepared page to reSize.

    RemovePage(Int32)

    Removes a page with the specified index.

    Declaration
    public void RemovePage(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of page to remove.

    Save(Stream)

    Saves prepared pages to a stream.

    Declaration
    public void Save(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to save to.

    Save(String)

    Saves prepared pages to a .fpx file.

    Declaration
    public void Save(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file to save to.

    Back to top © 1998-2025 Copyright Fast Reports Inc.