Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Report Object - handle if report does not exist

Status
Not open for further replies.

gooseriver

IS-IT--Management
Aug 4, 2006
93
CA
I am trying to delete a report object from the CMC using asp code. This code works if the report exists in the cmc. I need to handle this if the report does not exist:

CE10

'Retreive the name of the report from Start.html
ReportName = request.form("ReportName")

'Query for the InfoObject to delete
Set Report = iStore.Query("Select SI_ID from CI_INFOOBJECTS WHERE SI_PROGID='CrystalEnterprise.Report' and SI_Name='" & ReportName & "'")
ReportID = Report.Item(1).Properties("SI_ID")

'Delete Report from CMS
Report.Delete("#" & ReportID)
 
Hi add an If..Then test for the existance of
Report.Item(1)
before using the rest of the code..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top