Displaying whether a null value is allowed for a parameter

This example selects the first report it finds, and examines the EnableNullValue property for the first parameter.


<%

On Error Resume Next

'Retrieve InfoStore.

Set IStore = Session("IStore")


'Query for a report.

Set Result = IStore.Query("SELECT Top 1 SI_PROCESSINFO From CI_INFOOBJECTS Where " & _

    "SI_PROGID = 'CrystalEnterprise.Report'")

If (Err.Number <> 0) Then

    Response.Write "Example failed: Try logging on first!<BR>"

End If


'Retrieve the first report returned.

Set ReportObject = Result.Item(1)


'Retrieve the report interface.

Set ReportInterface = ReportObject.PluginInterface

If (Err.Number <> 0) Then

    Response.Write "Example failed: Try logging on first!<BR>"

End If



If ReportInterface.ReportParameters.Count > 0 Then

    If ReportInterface.ReportParameters.Item(1).EnableNullValue = TRUE Then

        Response.Write "The user may choose Null for this parameter."

    Else

        Response.Write "The user may not choose Null for this parameter."

    End If

Else

    Response.Write "This report does not have any parameters."

End If

%>




Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com