CrystalReportViewer.ReportSource Property
Sets the report to bind to the CrystalReportViewer control.
Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)
Syntax
'Declaration
Public Overrides WriteOnly Property ReportSource ( _
ByVal value As Object _
) As Object
public override object ReportSource [
object value
]{set;}
Parameters
- value
Example
This example shows how to set the report source of a CrystalReportViewer control.
'Declaration
Private Sub SetReportSource(ByVal myReportPath As String)
Dim myReportPathAsObject As Object = CType(myReportPath, Object)
Dim myReportClientDocument As ReportClientDocument = New ReportClientDocumentClass
myReportClientDocument.Open(myReportPathAsObject, 0)
CrystalReportViewer.ReportSource = myReportClientDocument
End Sub
private void SetReportSource(String reportPath)
{
object reportPathAsObject = (object)reportPath;
ReportClientDocument reportClientDocument = new ReportClientDocumentClass();
reportClientDocument.Open(ref reportPathAsObject, 0);
crystalReportViewer.ReportSource = reportClientDocument;
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports .NET XI R2
See Also
Reference
CrystalReportViewer Class
CrystalReportViewer Members
CrystalDecisions.Web Namespace