Returns the ReportMgr object associated with the current session. Report to be generated is designated by the reportName parameter.
You can use the ReportMgr object to execute the specified report, check the status of the report while it is being processed, or check the report parameters.
VBScript
Const OLEWKSPCSYSTEMQUERIES = 1 Dim oSession ' a Session object Dim oResultSet ' a Resultset object Dim oEntity ' an Entity object Dim oWorkSpace ' a Workspace object Dim oReportMgr ' a ReportMgr object Dim querylist Dim querystr Dim filename Set oSession = CreateObject("CLEARQUEST.SESSION") oSession.UserLogon "admin", "", "RUC", AD_PRIVATE_SESSION, "" Set oWorkSpace = oSession.GetWorkSpace querylist = oWorkSpace.GetReportList(OLEWKSPCSYSTEMQUERIES) For Each querystr In querylist filename = "c:\test.html" Set oReportMgr = oWorkSpace.GetReportMgr(querystr) oReportMgr.SetHTMLFileName filename Call oReportMgr.ExecuteReport Next
Perl
use CQPerlExt; my $session; my $workspace; my $reportMgr; my $reportName = "Personal Queries/Sample_report"; my $htmlPath = "c:\\temp\\my-report.html"; $session = CQSession::Build(); CQSession::UserLogon ("admin", "", "SAMPL", ""); $workspace = $session->GetWorkSpace(); $reportMgr = $workspace->GetReportMgr ( $reportName ); $reportMgr->SetHTMLFileName($htmlPath); $reportMgr->ExecuteReport(); CQSession::Unbuild($session);