The WebViewer control that is licensed with the Professional Edition allows you to quickly display reports in Web applications.
Once you drop the control onto a Web Form, you can look in the Visual Studio Properties grid and select the ViewerType that you want to use.
The WebViewer control supports the following types:
In a web viewer, an RDL report can be rendered in two modes - Paginated and Galley. Using galley mode, you can view the contents of the RDL report in a single and scrollable page. You can set Galley mode through UI of the web viewer or through code by setting RenderMode property to Galley.
To write the code in Visual Basic.NET (Page report/RDL report)
VB code. Paste INSIDE the Page Load event |
Copy Code
|
---|---|
Dim rpt As New GrapeCity.ActiveReports.PageReport() rpt.Load(New System.IO.FileInfo(Server.MapPath("")+"\invoice.rdlx")) WebViewer1.Report = rpt |
To write the code in C# (Page report/RDL report)
C# code. Paste INSIDE the Page Load event |
Copy Code
|
---|---|
GrapeCity.ActiveReports.PageReport rpt = new GrapeCity.ActiveReports.PageReport(); rpt.Load(new System.IO.FileInfo(Server.MapPath("")+"\\invoice.rdlx")); WebViewer1.Report = rpt; |
To write the code in Visual Basic.NET (Section code-based report)
VB code. Paste INSIDE the Page Load event |
Copy Code
|
---|---|
Dim rpt As New MyInvoiceReport() WebViewer1.Report = rpt |
To write the code in C# (Section code-based report)
C# code. Paste INSIDE the Page Load event |
Copy Code
|
---|---|
MyInvoiceReport rpt = new MyInvoiceReport(); WebViewer1.Report = rpt; |
To write the code in Visual Basic.NET (Section xml-based report)
VB code. Paste INSIDE the Page Load event |
Copy Code
|
---|---|
Dim sr As New SectionReport() sr.LoadLayout(Server.MapPath("") + "\Invoice.RPX") WebViewer1.Report = sr |
To write the code in C# (Section xml-based report)
C# code. Paste INSIDE the Page Load event |
Copy Code
|
---|---|
SectionReport sr = new SectionReport(); sr.LoadLayout(Server.MapPath("") + "\\Invoice.RPX); WebViewer1.Report = sr; |