GetReportMgr

Description

Returns the ReportMgr object associated with the current session. Report to be generated is designated by the reportName parameter.

Note: This method is for Windows™ only.

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.

Syntax

VBScript


workspace.GetReportMgr reportName 

Perl


$workspace->GetReportMgr(reportName); 
Identifier
Description
workspace
The Workspace object obtained from the current session.
reportName
A String containing the name of the report to run with the returned ReportMgr object.
Return value
Returns a reference to a ReportMgr object.

Example

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);