ActiveReports3 Request technical support
LoadLayout Method
See Also  Example


Retrieves a report XML layout (RPX) from a file, stream or resource.

Overload List

OverloadDescription
LoadLayout(String)Retrieves a report XML layout from a file and loads it into a report object.  
LoadLayout(String,ArrayList)  
LoadLayout(Stream)Retrieves a report XML layout from a stream and loads it into a report object.  
LoadLayout(Type,String)Retrieves a report XML layout from a resource. For internal use.  

Example

C#Copy Code
private void loadRPX()
{    
   ActiveReport1 rpt =
new ActiveReport1();
   rpt.LoadLayout(Application.StartupPath +
"\\NewRPX.RPX");
   viewer1.Document = rpt.Document;
   rpt.Run();
}
Visual BasicCopy Code
Dim rpt As New ActiveReport1()
Private Sub loadRPX()
    rpt.LoadLayout(Application.StartupPath + "\\NewRPX.RPX")
    Viewer1.Document = rpt.Document
    rpt.Run()
End Sub

Remarks

If you are loading the RPX into an existing ActiveReports for .NET project, you must first add a new blank report to your project so that any existing reports will not be overwritten by the loaded file. Also, when using this method, any code behind the report is ignored. To embed code in the report, use Scripting.

See Also