/// <summary> /// Run the code example. /// </summary> /// <param name="user">The Dfa user object running the code example. /// </param> public override void Run(DfaUser user) { // Create ReportRemoteService instance. ReportRemoteService service = (ReportRemoteService) user.GetService( DfaService.v1_19.ReportRemoteService); long queryId = long.Parse(_T("INSERT_QUERY_ID_HERE")); // Create report search criteria object. ReportSearchCriteria reportSearchCriteria = new ReportSearchCriteria(); reportSearchCriteria.queryId = queryId; try { // Get report information. ReportInfoRecordSet reportInfoRecordSet = service.getReportsByCriteria(reportSearchCriteria); // Display information on reports. if (reportInfoRecordSet.records != null && reportInfoRecordSet.records.Length > 0) { foreach (ReportInfo report in reportInfoRecordSet.records) { Console.WriteLine("Report with ID '{0}', status of '{1}' and URL of '{2}' was found.", report.reportId, report.status, report.url); } } else { Console.WriteLine("No reports found for your query ID."); } } catch (Exception ex) { Console.WriteLine("Failed to retrieve all reports. Exception says \"{0}\"", ex.Message); } }
public ReportInfoRecordSet getReportsByCriteria(ReportSearchCriteria ReportSearchCriteria) { object[] results = this.Invoke("getReportsByCriteria", new object[] {ReportSearchCriteria}); return ((ReportInfoRecordSet) (results[0])); }