This example selects the first report it finds, prints its record selection formula, and then changes it.
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!<BR>"
Response.Write "The record formula for this report is: "
Response.Write ReportInterface.RecordFormula
Response.Write "<BR><BR>Changing the record formula...<BR>"
'The line below has been commented out to avoid altering any of your reports.
'Enter your formula value below.
'ReportInterface.RecordFormula = "{enter_formula_value_here}"
Response.Write "The change was not successful."
Response.Write "The change was successful."
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |