home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
crpgrp.tcl
< prev
next >
Wrap
Text File
|
1997-06-19
|
4KB
|
137 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1995
#
# File: @(#)crpgrp.tcl /main/titanic/2
# Author: Harm Leijendeckers
# Description: Report on corporate groups
# Usage in: Corporate
#
#---------------------------------------------------------------------------
# SccsId = @(#)crpgrp.tcl /main/titanic/2 19 Jun 1997 Copyright 1995 Cadre Technologies Inc.
Class ReportCorporateGroups : {ReportBase} {
constructor
method setHeader
method corporateReport
}
constructor ReportCorporateGroups {class this} {
set this [ReportBase::constructor $class $this]
$this reportName "Corporate Groups"
return $this
}
method ReportCorporateGroups::setHeader {this} {
[$this report] header {
[$this report] print - 131 fill line
# print logo1 only if it's not empty
if { [string length [$this logo1]] } {
[$this report] print [$this logo1] line
}
[$this report] print [$this logo2] line
[$this report] print [$this logo3]
[$this report] space 10
[$this report] print "Report: [$this reportName]" 50
[$this report] print "Date: [[$this report] date]" line
[$this report] print [$this logo4] line
[$this report] print - 131 fill line
}
}
method ReportCorporateGroups::corporateReport {this} {
set allCorporateGroups [[$this corporate] corporateGroups]
if [lempty $allCorporateGroups] { return 0 }
set report [$this report]
foreach cg [osort name $allCorporateGroups] {
set allVersions [$cg corporateGroupVersions]
set phaseType [query -s savedGroupVersion.system.phase.type \
[lindex $allVersions 0]]
$report line
$report line
$report print "Corporate Group: "
$report print [$cg name] 35
$report print "Project: "
$report print [[[$cg savedGroup] project] name] 35
$report print "Phase Type: "
$report print $phaseType line
$report print "Saved Group: " 17 right
$report print [[$cg savedGroup] name] 35
$report print " System: "
$report print [[[$cg savedGroup] system] name] line
$report line
$report print CG 3 right
$report separator " | "
$report print SG 3 right
$report separator " | "
$report print "Contents" 33
$report separator " | "
$report print "Reused in" 37
$report separator " | "
$report print Creator 10
$report separator " | "
$report print "Created" 8
$report separator " | "
$report print "Comments" line
$report print - 131 fill line
foreach version [osort versionNumber $allVersions] {
set savedGroupVersion [$version savedGroupVersion]
$report print [$version versionNumber] 3 right
$report separator " | "
$report print [$savedGroupVersion versionNumber] 3 right
$report separator " | "
set contents ""
foreach fileV [osort file.type file.name [$version fileVersions]] {
set file [$fileV file]
set toadd [string range \
"[$file name].[$file type].[$fileV versionNumber]" 0 32]
set contents [format "%s%-33s" $contents $toadd]
}
$report print $contents 33
$report separator " | "
set reusedin ""
foreach sysv [$version reusedIn] {
set projtxt [string range [[$sysv project] name] 0 12]
set phasetxt [string range [[$sysv phase] name] 0 0]
set projphasetxt [format %s/%s $projtxt $phasetxt]
set projphaselen [string length $projphasetxt]
set sysname [[$sysv system] name]
set versnrtxt [$sysv versionNumber]
set versnrlen [string length $versnrtxt]
set maxsysnamelen [expr 19-$versnrlen+(15-$projphaselen)]
set sysnametxt [string range $sysname 0 $maxsysnamelen]
set toadd [format %s/%s.%s $projphasetxt $sysnametxt $versnrtxt]
set reusedin [format %s%-37s $reusedin $toadd]
}
$report print $reusedin 37
$report separator " | "
$report print [$savedGroupVersion creator] 10
$report separator " | "
$report print [clock format [$version createTime] -format "%D"] 8
$report separator " | "
$report print [$version comments] 20
$report line
}
}
$report page
return 0
}
set executeMe [ReportCorporateGroups new]