This example selects the first report it finds, and then examines and modifies the first value of the first parameter.
Set IStore = Session("IStore")
Set result = IStore.Query("SELECT Top 1 SI_PROCESSINFO From CI_INFOOBJECTS Where " & _
"SI_PROGID = 'CrystalEnterprise.Report'")
Response.Write "Example failed: Try logging on first!<BR>"
'Retrieve the first report returned.
Set ReportObject = Result.Item(1)
'Retrieve the report interface.
Set ReportInterface = ReportObject.PluginInterface
Response.Write "Example failed: Try logging on first!<BR>"
If ReportInterface.ReportParameters.Count > 0 Then
If ReportInterface.ReportParameters.Item(1).DefaultValues.Count > 0 Then
If ReportInterface.ReportParameters.Item(1).DefaultValues.Item(1).IsNull Then
Response.Write "The value is Null."
Response.Write "The value is not Null and is being changed."
ReportInterface.ReportParameters.Item(1).DefaultValues.Item(1).IsNull= _
'The line below has been removed in this example to avoid changing any
'report properties on your machine.
Response.Write "<BR>The changes could not be " & _
Response.Write "<BR>The changes were " & _
"successfully made on the server."
Response.Write "This parameter does not have any default values."
Response.Write "This report does not have any parameters."
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |