/** Licensed Materials - Property of IBM IBM Cognos Products: DOCS (C) Copyright IBM Corp. 2005 US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ using System; using cognosdotnet_10_2; namespace SamplesCommon { public class ReportAndQueryObject : baseClass { public ReportAndQueryObject() { this.defaultName = new tokenProp(); this.searchPath = new stringProp(); this.objectClass = new classEnumProp(); } public ReportAndQueryObject[] reportAndQueryList = new ReportAndQueryObject[0]; public override string ToString() { return this.defaultName.value; } public ReportAndQueryObject(contentManagerService1 cBICMS) { reportAndQueryList = buildReportQueryList(cBICMS); } public ReportAndQueryObject[] getReportAndQueryList(contentManagerService1 cBICMS) { return reportAndQueryList; } public ReportAndQueryObject[] buildReportQueryList(contentManagerService1 cBICMS) { baseClass[] reports = new baseClass[0]; baseClass[] queries = new baseClass[0]; propEnum[] props = new propEnum[] { propEnum.searchPath, propEnum.defaultName, propEnum.objectClass}; sort[] sortOptions = { new sort() }; sortOptions[0].order = orderEnum.ascending; sortOptions[0].propName = propEnum.defaultName; searchPathMultipleObject reportsPath = new searchPathMultipleObject(); reportsPath.Value = "/content//report"; searchPathMultipleObject queriesPath = new searchPathMultipleObject(); queriesPath.Value = "/content//query"; reports = cBICMS.query( reportsPath, props, sortOptions, new queryOptions()); queries = cBICMS.query( queriesPath, props, sortOptions, new queryOptions()); ReportAndQueryObject[] reportQueryList = new ReportAndQueryObject[reports.GetLength(0) + queries.GetLength(0)]; int nbReports = 0; int nbQueries = 0; if ((reports != null) && (reports.GetLength(0) > 0)) { nbReports = reports.GetLength(0); for (int i=0; i 0)) { nbQueries = queries.GetLength(0); for (int j=0; j