Visual Studio 2005 includes report design functionality in CrystalReport controls so that you can add full-featured reports to a customized application report viewer. CrystalReport are designed with drag-and-drop simplicity using the Designer.
CrystalReport control offers the following benefits:
- The reporting engine built into CrystalReport can perform operations such as filtering, sorting, grouping and aggregation.
- Supports a variety of ways in which to present data. You can present data as lists, tables, charts and matrices (also known as crosstabs.)
- You can specify fonts, colors, border styles, background images etc to make your report more presentable.
- You can have collapsible sections, document map, bookmarks, interactive sorting etc in your report.
- You can embed expressions in the report to change display style dynamically based on data values.
- Supports export report from different application like Excel, text, word, PDF etc.
- Supports printing and print preview.
(Here a sample code & screenshot to view your design report in VB.Net:)
CrystalReportViewer Control
CrystalReport Control
Imports System.Windows.Forms
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.ReportSource
Public Class ReportViewer
Private crReport As ReportDocument
Private sCaption as String
'Configure Crystal Report for SQL Connection
Private Sub ConfigureCrystalReports()
Dim FormCrViewer As New frmCrystalReportViewer
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
myConnectionInfo.ServerName = gsServerLocation
myConnectionInfo.UserID = "sa"
myConnectionInfo.Password = "+XXXXXX+"
myConnectionInfo.IntegratedSecurity = False
SetDBLogonForReport(myConnectionInfo, crReport)
FormCrViewer.CrystalReportViewer1.ReportSource = crReport
FormCrViewer.Text = sCaption
FormCrViewer.Show()
End Sub
'Set All SQL databases from Crystal Report
Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo, _
ByVal myReportDocument As ReportDocument)
Dim myTables As Tables = myReportDocument.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
End Sub
Private Sub Accuracy_Detailed()
Dim CrystalRpt As New Accuracy_Detailed
crReport = New ReportDocument()
crReport = CrystalRpt
sCaption = "ACCURACY REPORT - DETAILED"
ConfigureCrystalReports()
End Sub
End Class
FREE PDF BOOK DOWNLOAD