[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.SectionReport.LoadLayout

LoadLayout Method

LoadLayout(Type, string)

Loads the report layout from the embedded resource.

Declaration
public void LoadLayout(Type type, string resourceName)
Parameters
Type Name Description
Type type

A Type value from the assembly containing the embedded resource.

string resourceName

A string value representing the name of the embedded resource.

Examples
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
sectionReport.LoadLayout(typeof(SectionReport), "resourceName"); 
sectionReport.Document.Printer.PrinterName = String.Empty;
viewer.LoadDocument(sectionReport);
Exceptions
Type Condition
ReportException

Thrown if resourceName cannot loaded.

LoadLayout(XmlReader)

Loads the report layout from the System.Xml.XmlReader.

Declaration
public void LoadLayout(XmlReader reader)
Parameters
Type Name Description
XmlReader reader

A System.Xml.XmlReader value with which to load the layout.

Examples
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
var reader = System.Xml.XmlReader.Create("Report.rpx");
sectionReport.LoadLayout(reader);
sectionReport.Document.Printer.PrinterName = String.Empty;
reader.Close();
Exceptions
Type Condition
ReportException

Thrown if the reader is null.

LoadLayout(string)

Loads the report layout from the file.

Declaration
[Obsolete("This method has been deprecated. Please, use LoadLayout(XmlReader) method instead")]
public void LoadLayout(string fileName)
Parameters
Type Name Description
string fileName

A string value representing the name of the file containing the layout.

Examples
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
sectionReport.LoadLayout("Report.rpx");
sectionReport.Document.Printer.PrinterName = String.Empty;
viewer.LoadDocument(sectionReport);

LoadLayout(string, out ArrayList)

Loads report's layout from file.

Declaration
[Obsolete("This method has been deprecated. Please, use LoadLayout(XmlReader) method instead")]
public void LoadLayout(string fileName, out ArrayList errors)
Parameters
Type Name Description
string fileName

A string value representing the name of the file containing the layout.

ArrayList errors

An ArrayListvalue used to store layout validation errors encountered during the loading process.

Examples
SectionReport sectionReport = new GrapeCity.ActiveReports.SectionReport();
sectionReport.LoadLayout("Report.rpx", out System.Collections.ArrayList error);
sectionReport.Document.Printer.PrinterName = String.Empty;
viewer.LoadDocument(sectionReport);

LoadLayout(Stream)

Loads the report layout from the stream.

Declaration
[Obsolete("This method has been deprecated. Please, use LoadLayout(XmlReader) method instead")]
public void LoadLayout(Stream stream)
Parameters
Type Name Description
Stream stream

A Stream value containing the layout.

Examples
SectionReport sectionReport = new SectionReport();
using (XmlTextReader reader = new XmlTextReader("Report.rpx"))
{
	sectionReport.LoadLayout(reader);
}
sectionReport.Document.Printer.PrinterName = String.Empty;
viewer.LoadDocument(sectionReport);

LoadLayout(Stream, out ArrayList)

Loads the report layout from the stream.

Declaration
[Obsolete("This method has been deprecated. Please, use LoadLayout(XmlReader) method instead")]
public void LoadLayout(Stream stream, out ArrayList errors)
Parameters
Type Name Description
Stream stream

A Stream value containing the layout.

ArrayList errors

An ArrayListvalue used to store layout validation errors encountered during the loading process.

Examples
SectionReport sectionReport = new SectionReport();
using (XmlTextReader reader = new XmlTextReader("Report.rpx"))
{
	sectionReport.LoadLayout(reader, out System.Collections.ArrayList error);
}
sectionReport.Document.Printer.PrinterName = String.Empty;
viewer.LoadDocument(sectionReport);