ActiveReports 6 Online Help Send comments on this topic.
LoadLayout(XmlReader) Method
See Also  Example
ActiveReports6 Assembly > DataDynamics.ActiveReports Namespace > ActiveReport Class > LoadLayout Method : LoadLayout(XmlReader) Method

reader
XmlReader object from which to retrieve the report's layout.

Glossary Item Box

Retrieves a report XML layout from an XmlReader and loads it into a report object.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub LoadLayout( _
   ByVal reader As XmlReader _
) 
C# 
public void LoadLayout( 
   XmlReader reader
)

Parameters

reader
XmlReader object from which to retrieve the report's layout.

Remarks

When using this method, any code behind the report is ignored. To embed code in the report, use Scripting.

Example

C#Copy Code
DataDynamics.ActiveReports.ActiveReport report = new DataDynamics.ActiveReports.ActiveReport();
System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader("\\report.rpx");
report.LoadLayout(xtr);
xtr.Close();

// reading from XML DOM (XmlNode)
using (System.Xml.XmlNodeReader reader = new System.Xml.XmlNodeReader(node))
{
   report.LoadLayout(reader);
}

// reading from stream
using (System.Xml.XmlReader reader = System.Xml.XmlReader.Create(inputStream))
{
   report.LoadLayout(reader);
}
          
// reading from string
string layoutContent = "<ActiveReports>...  ...</ActiveReports>";
using (System.Xml.XmlReader reader = System.Xml.XmlReader.Create(new System.IO.StringReader(layoutContent)))
{
   report.LoadLayout(reader);
}
Visual BasicCopy Code
Dim report As New DataDynamics.ActiveReports.ActiveReport()
Dim xtr As New System.Xml.XmlTextReader("\report.rpx")
report.LoadLayout(xtr)
xtr.Close()

' reading from XML DOM (XmlNode)
Using reader As New System.Xml.XmlNodeReader(node)
    report.LoadLayout(reader)
End Using

' reading from stream
Using reader As New System.Xml.XmlTextReader(inputStream)
    report.LoadLayout(reader)
End Using

' reading from string
Dim layoutContent As String = "<ActiveReports>... ...</ActiveReports>"
Using reader As New System.Xml.XmlTextReader(New System.IO.StringReader(layoutContent))
    report.LoadLayout(reader)
End Using

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.