LoadLayout(Stream) Method
Retrieves a report XML layout from a stream and loads it into a report object.
[Visual Basic]
Overloads Public Sub LoadLayout( _
ByVal stream As Stream _
)
[C#]
public void LoadLayout(
Stream stream
);
Parameters
- stream
A stream that contains a valid report XML layout.
Remarks
When using this method, any code behind the report is ignored. To embed code in the report, use Scripting.
Example
[C#]
private System.IO.Stream GetRemoteReport(String URLLocation) { System.Net.WebClient client = new System.Net.WebClient(); System.IO.Stream data = client.OpenRead(URLLocation); return data; } private void arv_Load(object sender, System.EventArgs e) { DataDynamics.ActiveReports.ActiveReport rpt = new DataDynamics.ActiveReports.ActiveReport(); rpt.LoadLayout(GetRemoteReport("http://localhost/ArWebSampleProCs/reports/invoice.xml")); rpt.Run(); this.arv.Document=rpt.Document; }
|
[Visual Basic]
Private Function GetRemoteReport(ByVal URLLocation As String) AsSystem.IO.Stream
Dim client As System.Net.WebClient = New System.Net.WebClient()
Dim Data As System.IO.Stream = client.OpenRead(URLLocation)
GetRemoteReport = Data
End Function
Private Sub Viewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Viewer1.Load
Dim rpt As New DataDynamics.ActiveReports.ActiveReport
rpt.LoadLayout(GetRemoteReport("http://localhost/Cover Page.xml"))
rpt.Run()
Me.Viewer1.Document = rpt.Document
End Sub |
See Also
ActiveReport Class
| ActiveReport Members
| Overload List
| Scripting
Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.