This example prints the group selection formula of the first report it finds. If there is no group selection formula it will set one.
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>"
Formula = ReportInterface.GroupFormula
Response.Write "There is no group formula. <BR>"
Response.Write "The new group formula is being set."
'The line below has been commented out to avoid altering any of your reports.
'Enter your formula value below.
'ReportInterface.GroupFormula = "enter_formula_value_here"
Response.Write "The group formula is: " & Formula
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |