Share via


ViewInfo Class

Provides properties for retrieving information about the report that binds to the CrystalReportViewer class.

Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)

Syntax

'Declaration
Public Class ViewInfo
public class ViewInfo

Example

The following example returns the last page number of the report if the last page number is known, or 0 if the last page number is not known.

'Declaration

      Private Function GetLastPageNumber(ByVal myCrystalReportViewer As CrystalReportViewer) As Integer
        GetLastPageNumber = 0
        If myCrystalReportViewer.ViewInfo.IsLastPageNumberKnown = True Then
          GetLastPageNumber = myCrystalReportViewer.ViewInfo.LastPageNumber
        End If
      End Function
      private int GetLastPageNumber(CrystalReportViewer myCrystalReportViewer)
      {
        int result = 0;
        if (myCrystalReportViewer.ViewInfo.IsLastPageNumberKnown)
        {
          result = myCrystalReportViewer.ViewInfo.LastPageNumber;
        }
        return result;
      }

Inheritance Hierarchy

Object
   ViewInfo

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports .NET 10

See Also

Reference

ViewInfo Members
CrystalDecisions.Web Namespace