SetFormat
Description
Enables you to specify the version of HTML in which to save the report.
You must call this method after calling the SetHTMLFileName method and before calling the ExecuteReport method to set the HTML format type of the report output file.
You specify
one of the following report format constants in the format parameter.
Note: Each
constant is preceded by
AD
for VBScript or $CQPerlExt::CQ
for
Perl. For example, AD_REPORT_FORMAT_HTML32
.Constant | Value | Description |
---|---|---|
_REPORT_FORMAT_HTML32 | 1 | Generate file in HTML 3.2 format |
_REPORT_FORMAT_HTML40 | 2 | Generate file in HTML 4.0 format |
The default format is HTML 3.2 format (_REPORT_FORMAT_HTML32
).
If you do not use the SetFormat method before calling ExecuteReport,
the output is generated in the default format.
Syntax
VBScript
reportMgr.SetFormat
format
Perl
$reportMgr->SetFormat
(format);
- Identifier
- Description
- reportMgr
- The ReportMgr object associated with the current session.
- format
- A Long that specifies the HTML format type of the report file.
- Return value
- None.
Examples
VBScript
Dim cq_user,cq_pass,dbset,userdb
cq_user="admin"
cq_pass=""
dbset="7.0.0"
userdb="sampl"
'Create external session object
Set sessionObj = CreateObject("CLEARQUEST.SESSION")
sessionObj.UserLogon cq_user, cq_pass , userdb, AD_PRIVATE_SESSION, dbset
Set wkspc = sessionObj.GetWorkSpace
Set repMgr = wkspc.GetReportMgr("Public Queries/Reports/Defect Detail (All)")
repMgr.SetHTMLFileName "W:\Shared\Defects\out_report_format32.html"
repMgr.SetFormat AD__REPORT_FORMAT_HTML32
repMgr.ExecuteReport
' Remove the reference
Set sessionObj = Nothing
Perl
use CQPerlExt;
$CQSessionobj = CQSession::Build();
$CQSessionobj->UserLogon('admin', '', 'sampl', '7.0.0');
$CQWorkSpace = $CQSessionobj->GetWorkSpace();
$CQReportMgr = $CQWorkSpace->GetReportMgr('Public Queries/Reports/Defect Detail (All)');
$CQReportMgr->SetHTMLFileName("W:\\Shared\\Defects\\out_pl_CQ_REPORT_FORMAT_HTML40.html");
$CQReportMgr->SetFormat($CQPerlExt::CQ_REPORT_FORMAT_HTML40);
$CQReportMgr->ExecuteReport();
CQSession::Unbuild($CQSessionobj);