To load and display a Page, RDLX, and Section report output using the Viewer control in the Windows Forms application.
C# |
Copy Code
|
---|---|
string file_name = @"..\..\ReportName.rdlx"; GrapeCity.ActiveReports.PageReport pageReport = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(file_name)); GrapeCity.ActiveReports.Document.PageDocument pageDocument = new GrapeCity.ActiveReports.Document.PageDocument(pageReport); viewer1.LoadDocument(pageDocument); |
VB.NET |
Copy Code
|
---|---|
Dim file_name As String = "..\..\ReportName.rdlx"
Dim pageReport As New GrapeCity.ActiveReports.PageReport(New System.IO.FileInfo(file_name))
Dim pageDocument As New GrapeCity.ActiveReports.Document.PageDocument(pageReport)
Viewer1.LoadDocument(pageDocument)
|
C# |
Copy Code
|
---|---|
SectionReport1 sectionReport = new SectionReport1();
viewer1.LoadDocument(sectionReport);
|
VB.NET |
Copy Code
|
---|---|
Dim sectionReport As New SectionReport1() Viewer1.LoadDocument(sectionReport) |
C# |
Copy Code
|
---|---|
GrapeCity.ActiveReports.SectionReport sectionReport = new GrapeCity.ActiveReports.SectionReport(); System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(@"..\..\SectionReport1.rpx"); sectionReport.LoadLayout(xtr); xtr.Close(); viewer1.LoadDocument(sectionReport); |
VB.NET |
Copy Code
|
---|---|
Dim sectionReport As New GrapeCity.ActiveReports.SectionReport()
Dim xtr As New System.Xml.XmlTextReader("..\..\SectionReport1.rpx")
sectionReport.LoadLayout(xtr)
xtr.Close()
Viewer1.LoadDocument(sectionReport)
|
Caution: Refresh button gets disabled when you load a section report in the Viewer control through any of the following: