Share via


ServerFileReport Class

The ServerFileReport class is a managed component that acts as a proxy to the ServerFileReportService class while providing a limited object model to the developer.

Namespace CrystalDecisions.Shared Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class ServerFileReport
    Inherits ReportComponentBase
    Implements IComponent, IDisposable, IReportComponent, ISerializable
[SerializableAttribute]
public class ServerFileReport : ReportComponentBase, IComponent, IDisposable, IReportComponent, ISerializable

Remarks

You can get and set the following information using this component: report file name, database logon info, and parameter field values. This component can be bound to the CrystalReportViewer control, and will remote all of the control's calls to the ServerFileReportService.

Example

This example shows how to get new server file report.

'Declaration

          Private Function GetNewServerFileReport(ByVal reportName As String) As ServerFileReport
          Dim myServerFileReport As New ServerFileReport
          With myServerFileReport
          .ObjectType = EnumServerFileType.REPORT
          .ReportPath = "C:\ReportRepository\" & reportName
          .WebServiceUrl = "https://localhost/crystalreportwebformviewer/serverfilereportservice.asmx"
          End With
          GetNewServerFileReport = myServerFileReport
          End Function
        
          private ServerFileReport GetNewServerFileReport(string reportName)
          {
          ServerFileReport myServerFileReport = new ServerFileReport();
          myServerFileReport.ObjectType = EnumServerFileType.REPORT;
          myServerFileReport.ReportPath = string.Concat("C:\\ReportRepository\\", reportName);
          myServerFileReport.WebServiceUrl = "https://localhost/crystalreportwebformviewer/serverfilereportservice.asmx";
          return myServerFileReport;
          }
        

Inheritance Hierarchy

Object
   MarshalByRefObject
      Component
         ReportComponentBase
            ServerFileReport

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

ServerFileReport Members
CrystalDecisions.Shared Namespace