Specialized Administration > Analyzing System and Business Information > Reports and Queries > About Reports > Deleting a Report > Deleting a Report Using a Loader
  
Deleting a Report Using a Loader
Using a Windchill loader, you can delete the default and custom reports, so users access only those reports that are relevant to them.
The elements used in the load file differ when deleting reports from the Windchill database and Cognos database. You can refer to the sample load files DeleteOOTBWindchillReports.xml and DeleteOOTBCognosReports.xml while creating your load file. The files are located at this path: $WT_HOME/loadFiles/reports.
Perform the following procedure to delete a report using a loader:
1. Create a load file using the element csvDeleteWindchillReport or csvDeleteCognosReport.
Use csvDeleteWindchillReport to delete the reports that were created using Report Builder or Windchill business reporting tool and exist in the Windchill database. Append the element with the following handler:
<csvDeleteWindchillReport handler="com.ptc.windchill.enterprise.report.ReportHelper.deleteWindchillReports">
Use csvDeleteCognosReport to delete the reports that exist in the Cognos database. Append the element with the following handler:
<csvDeleteCognosReport handler="com.ptc.windchill.enterprise.report.ReportHelper.deleteCognosReports">
2. Add the following attributes in the load file:
csvWindchillReportName: Specify the name of the report to be deleted. It is a required attribute.
Example: <csvWindchillReportName>DemoReportObject</csvWindchillReportName>
csvContainerName: Specify the path of the container where the report is stored. If you do not provide this value, any report that matches the specified name will be deleted from the Site container. It is an optional attribute.
Example: <csvContainerName>/wt.inf.container.OrgContainer=DefaultOrg/wt.inf.library.WTLibrary=Windchill PDM</csvContainerName>
csvThirdPartyReportingSystem: Specify the reporting system as JASPER or COGNOS. Use this attribute when there are two reports with the same name belonging to different reporting systems. You can keep the attribute blank for reports that were created using Report Builder.
Example: <csvThirdPartyReportingSystem>JASPER</csvThirdPartyReportingSystem>
For reports that exist in the Cognos database, specify only the report name with the folder in which the report exists. You can find this information in the properties file for a particular report or in the Cognos user interface. You need not specify the container path or the reporting system name.
Example: <csvReportName>WADM\CDRLs_Canceled</csvReportName>
3. Execute the load file.
Open a Windchill shell and run the following command:
windchill wt.load.LoadFromFile -u<user name>-p<password>-d<location of the load file>
For example, windchill wt.load.LoadFromFile -uwcadmin-pwcadmin-dreports/DeleteWindchillDemoReports.xml
Check the method server log for any issues encountered while deleting the reports.