<!DOCTYPE openRPTDef>
<report>
 <title>Incident</title>
 <name>Incident</name>
 <description></description>
 <size>Letter</size>
 <portrait/>
 <topmargin>50</topmargin>
 <bottommargin>50</bottommargin>
 <rightmargin>50</rightmargin>
 <leftmargin>50</leftmargin>
 <querysource>
  <name>head</name>
  <sql>select incdt_number, incdt_summary,  
       incdt_assigned_username, incdt_status, 
       incdt_owner_username, incdtseverity_name,
       incdtpriority_name, incdtcat_name,
       crmacct_name, cntct_first_name || ' ' ||cntct_last_name as f_name,    
       cntct_phone,  cntct_email,cntct_title
  from incdt left outer join incdtseverity on 
       (incdt_incdtseverity_id = incdtseverity_id)
       left outer join incdtpriority on
       (incdt_incdtpriority_id = incdtpriority_id) 
       left outer join incdtcat on
       (incdt_incdtcat_id = incdtcat_id)
       left outer join crmacct on 
       (incdt_crmacct_id = crmacct_id) 
       left outer join cntct on 
       (incdt_cntct_id = cntct_id) 
  where incdt_id = &lt;? value("incdt_id") ?>;
   </sql>
 </querysource>
 <querysource>
  <name>detail</name>
  <sql>select incdt_descrip 
  from incdt
 where incdt_id = &lt;? value("incdt_id") ?>;</sql>
 </querysource>
 <querysource>
  <name>detail2</name>
  <sql>select comment_date, comment_user, comment_text 
  from comment
 where comment_source_id = &lt;? value("incdt_id") ?> and comment_source  = 'INCDT'
order by comment_date desc;</sql>
 </querysource>
 <querysource>
  <name>detail3</name>
  <sql>select url_title, url_url 
from url 
where url_source_id = &lt;? value("incdt_id") ?>
and url_source  = 'INCDT'

</sql>
 </querysource>
 <rpthead>
  <height>268</height>
  <field>
   <rect>
    <x>136</x>
    <y>57</y>
    <width>598</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdt_summary</column>
   </data>
  </field>
  <field>
   <rect>
    <x>128</x>
    <y>123</y>
    <width>251</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>f_name</column>
   </data>
  </field>
  <field>
   <rect>
    <x>370</x>
    <y>10</y>
    <width>171</width>
    <height>35</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>18</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdt_number</column>
   </data>
  </field>
  <field>
   <rect>
    <x>540</x>
    <y>144</y>
    <width>200</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdtseverity_name</column>
   </data>
  </field>
  <label>
   <rect>
    <x>24</x>
    <y>57</y>
    <width>104</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Description:</string>
  </label>
  <field>
   <rect>
    <x>128</x>
    <y>165</y>
    <width>342</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cntct_title</column>
   </data>
  </field>
  <label>
   <rect>
    <x>27</x>
    <y>123</y>
    <width>98</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Contact Name:</string>
  </label>
  <label>
   <rect>
    <x>422.8</x>
    <y>144</y>
    <width>112</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Severity :</string>
  </label>
  <label>
   <rect>
    <x>13</x>
    <y>165</y>
    <width>112</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Contact Job Title:</string>
  </label>
  <label>
   <rect>
    <x>231</x>
    <y>10</y>
    <width>131</width>
    <height>37</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>18</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>INCIDENT</string>
  </label>
  <field>
   <rect>
    <x>540</x>
    <y>187</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdt_owner_username</column>
   </data>
  </field>
  <label>
   <rect>
    <x>468</x>
    <y>187</y>
    <width>66.8</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Owner:</string>
  </label>
  <label>
   <rect>
    <x>455</x>
    <y>208</y>
    <width>79.8</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Assigned to:</string>
  </label>
  <field>
   <rect>
    <x>540</x>
    <y>208</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdt_assigned_username</column>
   </data>
  </field>
  <field>
   <rect>
    <x>128</x>
    <y>208</y>
    <width>279</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cntct_email</column>
   </data>
  </field>
  <label>
   <rect>
    <x>25</x>
    <y>208</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Contact Email:</string>
  </label>
  <label>
   <rect>
    <x>455</x>
    <y>105</y>
    <width>79.8</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Category:</string>
  </label>
  <field>
   <rect>
    <x>540</x>
    <y>105</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdtcat_name</column>
   </data>
  </field>
  <label>
   <rect>
    <x>455</x>
    <y>123</y>
    <width>79.8</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Status:</string>
  </label>
  <field>
   <rect>
    <x>540</x>
    <y>123</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdt_status</column>
   </data>
  </field>
  <field>
   <rect>
    <x>128</x>
    <y>105</y>
    <width>263</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>crmacct_name</column>
   </data>
  </field>
  <label>
   <rect>
    <x>13</x>
    <y>105</y>
    <width>112</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>CRM Acnt Name :</string>
  </label>
  <field>
   <rect>
    <x>540</x>
    <y>165</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>incdtpriority_name</column>
   </data>
  </field>
  <label>
   <rect>
    <x>468</x>
    <y>165</y>
    <width>66.8</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Priority:</string>
  </label>
  <label>
   <rect>
    <x>10.9</x>
    <y>243.624</y>
    <width>114</width>
    <height>20.5346</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Incident Notes:</string>
  </label>
  <field>
   <rect>
    <x>128</x>
    <y>144</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cntct_phone</column>
   </data>
  </field>
  <label>
   <rect>
    <x>25</x>
    <y>144</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Contact Phone:</string>
  </label>
  <field>
   <rect>
    <x>128</x>
    <y>187</y>
    <width>170</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cntct_phone</column>
   </data>
  </field>
  <label>
   <rect>
    <x>25</x>
    <y>187</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Contact Phone:</string>
  </label>
 </rpthead>
 <pghead>
  <firstpage/>
  <height>6</height>
 </pghead>
 <pghead>
  <height>36</height>
  <line>
   <xstart>5</xstart>
   <ystart>30</ystart>
   <xend>745</xend>
   <yend>30</yend>
   <weight>2</weight>
  </line>
 </pghead>
 <section>
  <name>detail</name>
  <detail>
   <key>
    <query>detail</query>
   </key>
   <height>37</height>
   <text>
    <rect>
     <x>10.9</x>
     <y>8</y>
     <width>730</width>
     <height>17</height>
    </rect>
    <bottompad>14</bottompad>
    <font>
     <face>Helvetica</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>incdt_descrip</column>
    </data>
   </text>
  </detail>
 </section>
 <section>
  <name>detail2</name>
  <group>
   <name>labour</name>
   <column></column>
   <head>
    <height>33.9041</height>
    <label>
     <rect>
      <x>10.9</x>
      <y>10.42</y>
      <width>114</width>
      <height>20.5</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <left/>
     <vcenter/>
     <string>Comments:</string>
    </label>
    <line>
     <xstart>2.90454</xstart>
     <ystart>3.94806</ystart>
     <xend>744.812</xend>
     <yend>3.62203</yend>
     <weight>1</weight>
    </line>
   </head>
  </group>
  <detail>
   <key>
    <query>detail2</query>
   </key>
   <height>49.0959</height>
   <field>
    <rect>
     <x>10.9</x>
     <y>0.621</y>
     <width>150</width>
     <height>20</height>
    </rect>
    <font>
     <face>Helvetica</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail2</query>
     <column>comment_date</column>
    </data>
   </field>
   <field>
    <rect>
     <x>196</x>
     <y>0.621</y>
     <width>150</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail2</query>
     <column>comment_user</column>
    </data>
   </field>
   <text>
    <rect>
     <x>10.9</x>
     <y>23.1</y>
     <width>730</width>
     <height>17</height>
    </rect>
    <bottompad>14</bottompad>
    <font>
     <face>Helvetica</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail2</query>
     <column>comment_text</column>
    </data>
   </text>
  </detail>
 </section>
 <section>
  <name>jobcost_head</name>
  <detail>
   <key>
    <query>head</query>
   </key>
   <height>47.4021</height>
   <line>
    <xstart>4.90454</xstart>
    <ystart>5.44606</ystart>
    <xend>746.812</xend>
    <yend>5.12003</yend>
    <weight>1</weight>
   </line>
   <label>
    <rect>
     <x>10.9</x>
     <y>7.7823</y>
     <width>114</width>
     <height>20.5</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <string>Documents:</string>
   </label>
   <label>
    <rect>
     <x>10.9</x>
     <y>27.4</y>
     <width>100</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <string>Title</string>
   </label>
   <label>
    <rect>
     <x>289</x>
     <y>27.4</y>
     <width>100</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <string>URL</string>
   </label>
  </detail>
 </section>
 <section>
  <name>detail3</name>
  <group>
   <name>detail3_footer</name>
   <column></column>
   <foot>
    <height>39.6984</height>
   </foot>
  </group>
  <detail>
   <key>
    <query>detail3</query>
   </key>
   <height>28.8318</height>
   <field>
    <rect>
     <x>289</x>
     <y>4.08</y>
     <width>460</width>
     <height>18</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail3</query>
     <column>url_url</column>
    </data>
   </field>
   <field>
    <rect>
     <x>10.9</x>
     <y>2.9979</y>
     <width>274.1</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail3</query>
     <column>url_title</column>
    </data>
   </field>
  </detail>
 </section>
 <pgfoot>
  <height>16</height>
  <label>
   <rect>
    <x>615</x>
    <y>0</y>
    <width>85</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Page:</string>
  </label>
  <field>
   <rect>
    <x>705</x>
    <y>0</y>
    <width>40</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Context Query</query>
    <column>page_number</column>
   </data>
  </field>
  <label>
   <rect>
    <x>5</x>
    <y>0</y>
    <width>85</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Report Date:</string>
  </label>
  <field>
   <rect>
    <x>95</x>
    <y>0</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Context Query</query>
    <column>report_date</column>
   </data>
  </field>
 </pgfoot>
 <rptfoot>
  <height>27.5186</height>
 </rptfoot>
</report>
