File: d_project_derived_deviations.srd
Size: 5208
Date: Sat, 08 May 2021 23:34:22 +0200
$PBExportHeader$d_project_derived_deviations.srd
$PBExportComments$The nested dw used in for showing the derived deviations in the analyzer report
release 5;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.prompt=no )
header(height=253 color="536870912" )
summary(height=1 color="536870912" )
footer(height=1 color="536870912" )
detail(height=77 color="536870912" )
table(column=(type=long updatewhereclause=yes identity=yes name=derived_item_id dbname="project_derived_item.derived_item_id" )
 column=(type=long updatewhereclause=yes name=project_derived_item_project_id dbname="project_derived_item.project_id" )
 column=(type=decimal(2) updatewhereclause=yes name=project_derived_item_actual_hours dbname="project_derived_item.actual_hours" )
 column=(type=char(50) updatewhereclause=yes name=name dbname="project_derived_item.name" )
 column=(type=decimal(2) updatewhereclause=yes name=percentage dbname="project_derived_item.percentage" )
 column=(type=decimal(4) updatewhereclause=yes name=ca dbname="a" )
 column=(type=decimal(18) updatewhereclause=yes name=compute_0007 dbname="compute_0007" )
 retrieve=" WITH x AS (SELECT sum(project_category_item.estimated_hours *    
                       project_role.multipler ) as est_hours
            FROM project_category_item,   
                  project_complexity,   
                  project_role  
             WHERE ( project_complexity.complexity_id = project_category_item.complexity_id ) and  
                    ( project_category_item.role_id = project_role.role_id ) and  
                    ( ( project_category_item.project_id = :project_id) ))  
 SELECT project_derived_item.derived_item_id,   
         project_derived_item.project_id,   
         project_derived_item.actual_hours,   
         project_derived_item.name,   
         project_derived_item.percentage,
      x.est_hours,
       (project_derived_item.actual_hours / x.est_hours)
    FROM project_derived_item,
            x
   WHERE (project_derived_item.project_id = :project_id ) and
         ((project_derived_item.actual_hours >= 
         ((project_derived_item.percentage / 100) * x.est_hours) * (1 + :deviation)) or
            (project_derived_item.actual_hours <= 
         ((project_derived_item.percentage / 100) * x.est_hours) * (1 - :deviation)))" arguments=(("project_id", number),("deviation", number)) )
compute(band=header alignment="0" expression="~"Derived Items Exceeding (+/-) ~" +  (deviation * 100) + ~"% ~""border="0" color="0" x="1" y="64" height="53" width="1134" format="[general]"  font.face="MS Sans Serif" font.height="-8" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
line(band=header x1="5" y1="240" x2="3009" y2="240" pen.style="0" pen.width="5" pen.color="0"  background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Name"border="0" color="0" x="147" y="160" height="53" width="165"  name=name_t  font.face="MS Sans Serif" font.height="-8" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Act Percent"border="0" color="0" x="1825" y="160" height="53" width="357"  font.face="MS Sans Serif" font.height="-8" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Est Percent"border="0" color="0" x="1079" y="160" height="53" width="357"  font.face="MS Sans Serif" font.height="-8" font.weight="700"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=7 alignment="1" tabsequence=32766 border="0" color="0" x="1797" y="12" height="53" width="275" format="0.00%"  name=compute_0007 edit.limit=0 edit.case=any edit.autoselect=yes  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="0" text="%"border="0" color="0" x="1276" y="12" height="53" width="37"  slideleft=yes  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="0" color="0" x="142" y="12" height="53" width="951" format="[general]"  name=name edit.limit=0 edit.case=any edit.autoselect=yes  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="1" tabsequence=32766 border="0" color="0" x="988" y="12" height="53" width="284" format="[General]"  name=percentage edit.limit=0 edit.case=any edit.autoselect=yes  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )