Subversion Repositories DevTools

Rev

Rev 70 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%
'=====================================================
'|                                                                   |
'|                          REPORTS DEFINITION                       |
'|                                                   |
'=====================================================
%>
<%
Sub Reports_List ( SSgroup )
        Dim repNum
%>  <!-- REPORTS LIST -------------------------------------------------------->
        <%Select Case SSgroup%>
        <%Case "Advanced_Search"%>
        <%repNum = 1%>
        <strong>Find ClearQuest Bugs / Issues Location</strong><br>
    Use this advance search to locate bugs / issues imported to Release Manager from ClearQuest.<br>
    <a href="rep_where_are_bugs_located.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%repNum = 2%>
    <strong>Find Packages Using "Ignore Warnings" feature</strong><br>
    Lists packages which use "Ignore Warning" feature on their dependencies.<br>
    <a href="rep_packages_using_ignore_feature.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%repNum = 4%>
        <strong>Find A Package</strong><br>
    Use this advanced search to find a package in Release Manager<br>
    <a href="rep_find_package.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%repNum = 5%>
        <strong>Find Package Version History</strong><br>
    Find all package versions and their current locations.<br>
    <a href="rep_package_version_history.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%Case "Release_Status"%>
        <%repNum = 3%>
        <strong>Current Status of Release</strong><br>
        Shows all packages in a selected release with their current state, owner and last modifier.<br>
        <a href="rep_current_state_of_release.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%repNum = 8%>
        <strong>Deployable Software Modules</strong><br>
        This report shows new and current deployable software modules. Use this report to find which modules will be deployed to the customer.<br>
        Also, use this report to find if there are new modules flaged as 'deployable'.<br>
        <a href="rep_depoyable_software_modules.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%repNum = 7%>
        <strong>Unit Tests per Package</strong><br>
        Use this report to check the unit tests performed on packages in a project.<br>
        <a href="rep_unit_tests_per_package.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <strong>All Packages With out-of-sync Dependencies</strong><br>
        List of all packages with dependencies out-of-sync with the release environment.<br>
        In escence, these are the packages which has versions in "latest" column of their dependencies.<br>
        Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
        <%Case "Bom_History"%>
        <%repNum = 9%>
        <strong>BOM History Tracker</strong><br>
        Use this report to find what changes occured in a BOM within specified date range.<br>
        <a href="rep_bill_of_materials.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%Case "Admin_Reports"%>
        <strong>All Packages by Project by Version Tree by Release</strong><br>
        CSV output of all packages used in Release Manager per Project.<br>
        <a href="rep_all_packages_by_project_by_vtree_by_release.asp" target="_blank" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <strong>All Runtime Dependencies by Project by Version Tree by Release</strong><br>
        CSV output of all runtime dependencies used in Release Manager per Project.<br>
        <a href="rep_all_runtime_dependencies_by_project_by_vtree_by_release.asp" target="_blank" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%repNum = 6%>
        <strong>Unused Packages</strong><br>
        All packages (Not Products) with no entries in "Used By" tab.<br>
    Use this report to help you clean up a release and remove all potentially unused packages.<br>
    <a href="rep_obsolete_packages.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%Case "Escrow"%>
        <%repNum = 9%>
        <strong>Bill of Materials (BOM)</strong><br>
        List of all ERG Products per network node for a particular
        project. Use this report to integrate a particular project.<br>
        <a href="rep_bill_of_materials.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <strong>Build Dependencies per Package</strong><br>
        Use this report to build package from source code. The report
        include package repository location, label and build dependencies.<br>
        Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
        <strong>Build Order</strong><br>
        Use this reports to find the order in which packages should be built.<br>
        Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
        <%Case "Bom_Difference"%>
        <strong>BOM Version Difference Tool</strong><br>
        Use this tool to find what changes occured in a BOM compared to another BOM. <br>
        A detailed report of changes between two BOMs can also be emailed upon user request.<br>
    <a href="diff.asp" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%Case "Bom_Merge_Manager"%>
        <strong>BOM Merge Manager Tool</strong><br>
        Use this tool to merge in a change from one BOM to another. <br>
    <a href="diffmerge.asp" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
        <%Case Else%>
        <b>&laquo; Select reporting category.</b>
        <%End Select%>
        <!-- REPORTS LIST END-------------------------------------------------------->

<%End Sub%>

<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sub Get_Projects ( NNproj_id, BBallow_all )
        Dim rsTemp, Query_String

        Query_String = _
        "SELECT * FROM DM_PROJECTS ORDER BY proj_name ASC"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))

        Response.write "<select name='FRproj_id' onChange=""Cascaded_Menu('parent','"& SCRIPT_NAME &"?FRvtree_id=&FRrtag_id=&group="& Request("group") &"&repnum="& Request("repnum") &"&FRproj_id=',this,0)"" class='form_item'>"
                If BBallow_all Then
                        Response.write "<option value='-1'>ALL</option>"
                Else
                        Response.write "<option></option>"
                End If

                While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                        If CDbl(NNproj_id) = CDbl(rsTemp.Fields("proj_id")) Then
                        Response.write "<option value='"& rsTemp.Fields("proj_id") &"' selected>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
                Else
                                Response.write "<option value='"& rsTemp.Fields("proj_id") &"'>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
                        End If
                        rsTemp.MoveNext
                WEnd
        Response.write "</select>"

        rsTemp.Close
        Set rsTemp = nothing
End Sub
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sub Get_Version_Trees ( NNproj_id, NNvtree_id, BBallow_all )
        Dim rsTemp, Query_String

        Query_String = _
        "SELECT vtree_id, vtree_name FROM vtrees WHERE hide = 'N' AND proj_id = "& NNproj_id &" ORDER BY vtree_id ASC"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))

        Response.write "<select name='FRvtree_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?FRproj_id="& NNproj_id &"&FRrtag_id=&group="& Request("group") &"&repnum="& Request("repnum") &"&FRvtree_id=',this,0)"" class='form_item'>"
                If BBallow_all Then
                        Response.write "<option value='-1'>ALL</option>"
                Else
                        Response.write "<option></option>"
                End If

                If NNproj_id <> -1 Then
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                If CDbl(NNvtree_id) = CDbl(rsTemp.Fields("vtree_id")) Then
                                Response.write "<option value='"& rsTemp.Fields("vtree_id") &"' selected>"& (rsTemp.Fields("vtree_name")) &"</option>"
                        Else
                                        Response.write "<option value='"& rsTemp.Fields("vtree_id") &"'>"& (rsTemp.Fields("vtree_name")) &"</option>"
                                End If
                                rsTemp.MoveNext
                        WEnd
                End If
        Response.write "</select>"

        rsTemp.Close
        Set rsTemp = nothing
End Sub
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sub Get_Release_Labels ( NNproj_id, NNrtag_id, BBallow_all )
        Dim rsTemp, Query_String

        Query_String = _
        "SELECT * FROM BRANCHES WHERE proj_id = "& NNproj_id &" ORDER BY branch_id ASC"
        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))

        Response.write "<select name='FRrtag_id' onChange=""Cascaded_Menu('parent','"& SCRIPT_NAME &"?FRproj_id="& NNproj_id &"&group="& Request("group") &"&repnum="& Request("repnum") &"&FRrtag_id=',this,0)"" class='form_item'>"
        If BBallow_all Then
                Response.write "<option value='-1'>ALL</option>"
        Else
                Response.write "<option></option>"
        End If

                If NNproj_id <> -1 Then
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                If CDbl(NNrtag_id) = CDbl(rsTemp.Fields("branch_id")) Then
                                Response.write "<option value='"& rsTemp.Fields("branch_id") &"' selected>"& (rsTemp.Fields("branch_name")) &"</option>"
                        Else
                                        Response.write "<option value='"& rsTemp.Fields("branch_id") &"'>"& (rsTemp.Fields("branch_name")) &"</option>"
                                End If
                                rsTemp.MoveNext
                        WEnd
                End If
        Response.write "</select>"

        rsTemp.Close
        Set rsTemp = nothing
End Sub
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sub Get_SBOM_Version ( NNproj_id, NNrtag_id, BBallow_all, NNversion )
        Dim rsTemp, Query_String

        Query_String = _
        "SELECT B.BOM_ID, B.BRANCH_ID, B.BOM_VERSION ||'.'||B.BOM_LIFECYCLE AS VERSION, BN.BOM_NAME FROM BOMS B, BOM_NAMES BN WHERE B.BRANCH_ID ="&NNrtag_id&" AND BN.BOM_NAME_ID = B.BOM_NAME_ID ORDER BY VERSION"


        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))


        Response.write "<select name='FRversion' class='form_item'>"
        If BBallow_all Then
                Response.write "<option value='-1'>ALL</option>"
        Else
                Response.write "<option></option>"
        End If

                If NNrtag_id <> -1 Then
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                If CStr(NNversion) = CStr(rsTemp.Fields("version")) Then
                                Response.write "<option value='"& rsTemp.Fields("version") &"' selected>"& rsTemp("BOM_NAME") &" "& (rsTemp.Fields("version")) &"</option>"
                        Else
                                        Response.write "<option value='"& rsTemp.Fields("version") &"'>"& rsTemp("BOM_NAME") &" "& (rsTemp.Fields("version")) &"</option>"
                                End If
                                rsTemp.MoveNext
                        WEnd
                End If
        Response.write "</select>"
        rsTemp.Close
        Set rsTemp = nothing

End Sub
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sub Get_Branches ( NNproj_id, NNrtag_id, BBallow_all )
        Dim rsTemp, Query_String

        Query_String = _
        "SELECT * FROM branches WHERE proj_id = "& NNproj_id &" ORDER BY branch_id ASC"
        Set rsTemp = OraDatabaseDM.DbCreateDynaset( Query_String, cint(0))
        Response.write "<select name='FRbranch_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?FRproj_id="& NNproj_id &"&group="& Request("group") &"&repnum="& Request("repnum") &"&FRrtag_id=',this,0)"" class='form_item'>"
        If BBallow_all Then
                Response.write "<option value='-1'>ALL</option>"
        Else
                Response.write "<option></option>"
        End If

                If NNproj_id <> -1 Then
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                If CDbl(NNrtag_id) = CDbl(rsTemp.Fields("branch_id")) Then
                                Response.write "<option value='"& rsTemp.Fields("branch_id") &"' selected>"& (rsTemp.Fields("branch_name")) &"</option>"
                        Else
                                        Response.write "<option value='"& rsTemp.Fields("branch_id") &"'>"& (rsTemp.Fields("branch_name")) &"</option>"
                                End If
                                rsTemp.MoveNext
                        WEnd
                End If
        Response.write "</select>"

        rsTemp.Close
        Set rsTemp = nothing
End Sub
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sub Get_Base_Views ( nRtag_id, nBase_view_id, BBallow_all )
        Dim rsTemp, Query_String

        Query_String = _
        "SELECT DISTINCT vi.view_id, vi.view_name"&_
        "  FROM VIEWS vi,"&_
        "               RELEASE_CONTENT rc"&_
        " WHERE rc.BASE_VIEW_ID = vi.VIEW_ID"&_
        "   AND rc.rtag_id = "& nRtag_id &_
        "ORDER BY UPPER( vi.view_name )"

        Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))

        Response.write "<select name='FRbase_view_id' class='form_item'>"
        If BBallow_all Then
                Response.write "<option value='-1'>ALL</option>"
        Else
                Response.write "<option></option>"
        End If

                If nRtag_id <> -1 Then
                        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                If CDbl(nBase_view_id) = CDbl(rsTemp.Fields("view_id")) Then
                                Response.write "<option value='"& rsTemp.Fields("view_id") &"' selected>"& (rsTemp.Fields("view_name")) &"</option>"
                        Else
                                        Response.write "<option value='"& rsTemp.Fields("view_id") &"'>"& (rsTemp.Fields("view_name")) &"</option>"
                                End If
                                rsTemp.MoveNext
                        WEnd
                End If
        Response.write "</select>"

        rsTemp.Close
        Set rsTemp = nothing
End Sub
%>
<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Packages Using Ignore Feature
' Description           :       Lists packages which use "Ignore Warning"
'                                               feature on their dependencies.
' INPUT                         :       Project, Vesion Tree, Release Label
'==================================================================================
Sub Packages_Using_Ignore_Feature ( SSsection, NNproj_id, NNrtag_id )
        Dim Query_String, rsRep
        Const Allow_All = TRUE

        If NNproj_id = "" Then NNproj_id = -1
        If NNrtag_id = "" Then NNrtag_id = -1

        If SSsection = "TITLE" Then
                Response.write "Packages Using 'Ignore Warnings' Feature"
                Exit Sub
        End If


        If SSsection = "FORM" Then
        %>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform">
      <tr>
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field">Project</td>
        <td width="100%"><%Call Get_Projects( NNproj_id, Allow_All )%></td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Release</td>
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Allow_All )%></td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit">
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If


        If SSsection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub

                Query_String = ReadFile( rootPath & "queries\rep_packages_using_ignore_feature.sql" )

                OraDatabase.Parameters.Add "PROJ_ID", NNproj_id, ORAPARM_INPUT, ORATYPE_NUMBER
                OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
        %>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
          <%
          Dim currRtag_id
          currRtag_id = -1
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )

          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='4' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If

          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY RTAG_ID -----------------
                  If CDbl(currRtag_id) <> CDbl(rsRep("rtag_id")) Then
                  %>
              <tr>
                <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td></td>
              </tr>
              <tr>
                <td colspan="4" nowrap class="body_scol"><%=rsRep("proj_name")  &" &gt; "& rsRep("rtag_name")%></td>
              </tr>
                  <%
                        currRtag_id = CDbl(rsRep("rtag_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
              <tr>
                <td class="body_row"></td>
                <td nowrap><a href="dependencies.asp?rtag_id=<%=rsRep("rtag_id")%>&pv_id=<%=rsRep("pv_id")%>" class="txt_linked"><%=rsRep("pkg_name")%></a></td>
                <td nowrap><a href="dependencies.asp?rtag_id=<%=rsRep("rtag_id")%>&pv_id=<%=rsRep("pv_id")%>" class="txt_linked"><%=rsRep("pkg_version")%></a></td>
                <td class="body_row"></td>
              </tr>
          <%  rsRep.MoveNext
          WEnd
          %>
      <tr>
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td></td>
      </tr>
          <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table>
        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If

End Sub
%>
<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Current State of Release
' Description           :       Show all packages in a release with their state, owner and modifier
' Form Input            :       Project, Vesion Tree, Release Label
' SQL INPUT                     :       rtag_id
'==================================================================================
Sub Current_State_of_Release ( SSsection, NNproj_id, NNrtag_id, NNpkg_states )
        Dim Query_String, rsRep
        Const Disallow_All = FALSE

        If NNproj_id = "" Then NNproj_id = -1
        If NNrtag_id = "" Then NNrtag_id = -1
        If NNpkg_states = "" Then NNpkg_states = -1

        If SSsection = "TITLE" Then
                Response.write "Current State of Release"
                Exit Sub
        End If


        If SSsection = "FORM" Then
        %>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
      <tr>
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field">Project</td>
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Release</td>
        <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
      </tr>
          <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Package States</td>
        <td class="form_field" nowrap>
                <span style="border: 1px solid #808080;">&nbsp;OK&nbsp;<input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_OK%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_OK) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
                <span style="border: 1px solid #808080;"><%=enum_imgCritical%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MAJOR%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MAJOR) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
                <span style="border: 1px solid #808080;"><%=enum_imgWarning%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MINOR%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MINOR) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
                <span style="border: 1px solid #808080;"><%=enum_imgCReady%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MAJOR_READY%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MAJOR_READY) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
                <span style="border: 1px solid #808080;"><%=enum_imgWReady%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MINOR_READY%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MINOR_READY) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
                </td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit">
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If


        If SSsection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub

                Query_String = ReadFile( rootPath & "queries\rep_details_current_status_of_release.sql" )
                Query_String = Replace ( Query_String, "/*PKG_STATES*/", NNpkg_states )

                OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
        %>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
                <td width="1%" nowrap class="body_colb">&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Owner&nbsp;&nbsp;&nbsp;</td>
                <td width="1%" nowrap class="body_colb">Last Modifier&nbsp;&nbsp;&nbsp;</td>
                <td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
           <%
          Dim currView_id
          currView_id = -1
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )

          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='8' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If

          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY RTAG_ID -----------------
                  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
                  %>
              <tr>
                <td colspan="7" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td></td>
              </tr>
                  <tr>
                <td colspan="8" nowrap class="body_scol"><%=rsRep("view_name")%></td>
              </tr>
                  <%
                        currView_id = CDbl(rsRep("view_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
              <tr>
                        <td class="body_row"></td>
                        <td><%=DefineStateIcon ( rsRep("pkg_state"), rsRep("dlocked"), NULL, NULL, NULL, NULL )%></td>
                        <%If rsRep("dlocked") = "Y" Then%>
                        <td align="center" class="form_item"><img src='images/i_locked.gif' width='7' height='10' hspace='6'></td>
                        <%Else%>
                        <td align="center" class="form_item"><img src='images/spacer.gif' width='7' height='10' hspace='6'></td>
                        <%End If%>
                <td nowrap class="body_row"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
                <td nowrap><a href="mailto:<%=rsRep("owner_email")%>" class="txt_linked"><%=rsRep("owner")%></a>&nbsp;&nbsp;&nbsp;</td>
                        <td nowrap><a href="mailto:<%=rsRep("modifier_email")%>" class="txt_linked"><%=rsRep("modifier")%></a>&nbsp;&nbsp;&nbsp;</td>
                <td class="body_row"><%=EuroDate( rsRep("insert_stamp") )%></td>
                        <td class="body_row"></td>
              </tr>
          <%  rsRep.MoveNext
          WEnd
          %>
          <tr>
        <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table>
        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If

End Sub
%>
<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Find ClearQuest Bugs / Issues Location
' Description           :       Locates bugs / issues imported from ClearQuest
' Form Input            :       CQ issue Database, CQ issue number list space separated
'==================================================================================
Sub Where_Are_Bugs_Located ( SSsection, NNiss_db, SSiss_num_list )
        Dim Query_String, rsRep

        If SSsection = "TITLE" Then
                Response.write "Find ClearQuest Bugs / Issues Location"
                Exit Sub
        End If


        If SSsection = "FORM" Then
        %>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRiss_num_list','Issue Number','R');return document.MM_returnValue">
      <tr>
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field" valign="top">ClearQuest Database</td>
        <td width="100%">
                <select name="FRiss_db" class="form_item">
                        <option value="<%=enumCLEARQUEST_DEVI_ID%>" <%If CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then%>selected<%End If%>>DEVI</option>
                        <option value="<%=enumCLEARQUEST_TDSE_ID%>" <%If CDbl(NNiss_db) = enumCLEARQUEST_TDSE_ID Then%>selected<%End If%>>TDSE</option>
        </select>
                </td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field" valign="top">Issue Numbers</td>
        <td class="form_txt"><input type="text" name="FRiss_num_list" size="50" class="form_item" value="<%=SSiss_num_list%>"><br>
                HINTS:<br>
                - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br>
                - Use space separated issue numbers for multiple search.</td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit">
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If


        If SSsection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub

                Dim SSsql, issARR, num_item, iss_num_col, issNumDict, rsCQ, recCount, maxRecCount
                Set rsCQ = Server.CreateObject("ADODB.Recordset")
                Set issNumDict = CreateObject("Scripting.Dictionary")


                '---- Find Issue numbers in ClearQuest ----
                If CDbl(NNiss_db) = enumCLEARQUEST_MASSI_ID Then
                        iss_num_col = "new_num"
                        SSsql = _
                        " SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
                        " FROM MASSI.admin.software_issue si"&_
                        " WHERE "


                ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DPGIM_ID Then
                        iss_num_col = "new_num"
                        SSsql = _
                        " SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
                        " FROM DPGIM.admin.software_issue si"&_
                        " WHERE "


                ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
                        iss_num_col = "new_num"
                        SSsql = _
                        " SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
      " FROM CQ_DEVI.admin.software_issue si"&_
                        " WHERE "


                ElseIf CDbl(NNiss_db) = enumCLEARQUEST_TDSE_ID Then
                        iss_num_col = "job_number"
                        SSsql = _
                        " SELECT dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
      " FROM CQ_TDSE.admin.request si"&_
                        " WHERE "

                End If


                '---- Split multiple search ----
                SSiss_num_list = Trim(SSiss_num_list)
                If InStr( SSiss_num_list, " " ) > 0 Then
                        ' space separator found
                        issARR = Split ( SSiss_num_list, " ")

                        For Each num_item In issARR
                                If num_item <> "" Then
                                        SSsql = SSsql & " (si."& iss_num_col &" LIKE '"& Replace( SQLstring(num_item), "*", "%" ) &"') OR"
                                End If
                        Next

                        SSsql = Left ( SSsql, Len(SSsql) - 2 )          ' Removes last OR

                Else
                        SSsql = SSsql & " (si."& iss_num_col &" LIKE '"& Replace( SQLstring(SSiss_num_list), "*", "%") &"')"

                End If

                rsCQ.ActiveConnection = CQ_conn
                rsCQ.Source = SSsql
                rsCQ.CursorType = 0
                rsCQ.CursorLocation = 2
                rsCQ.LockType = 3
                rsCQ.Open()

                ' Get find results from CQ
                recCount = 1
                maxRecCount = 1000
                issNumDict.ADD "-1", "-1"               ' take care of no results
                While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF) AND (recCount < maxRecCount))
                        issNumDict.ADD Cstr(rsCQ("iss_id")), Cstr(rsCQ("iss_num"))
                        recCount = recCount + 1
                        rsCQ.MoveNext
                WEnd

                rsCQ.Close
                Set rsCQ = nothing

                Query_String = ReadFile( rootPath & "queries\rep_where_are_bugs_located.sql" )
                Query_String = Replace ( Query_String, "/*ISS_DB*/", NNiss_db )
                Query_String = Replace ( Query_String, "/*ISS_ID_LIST*/", Join( issNumDict.Keys, ",") )

        %>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td width="1%" nowrap class="body_colb">Issue Number&nbsp;&nbsp;&nbsp;</td>
                <td width="1%" nowrap class="body_colb">Fixed At</td>
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Notes&nbsp;&nbsp;&nbsp;</td>
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
           <%
          Dim currIss_id
          currIss_id = -1
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )

          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='5' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If

          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY ISS_ID -----------------
                  If Cstr(currIss_id) <> Cstr(rsRep("iss_id")) Then
                  %>
                  <tr>
                <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td></td>
              </tr>
              <tr>
                <td nowrap><a href="javascript:;" onClick="MM_openBrWindow('_wform_issues_details.asp?iss_db=<%=NNiss_db%>&iss_id=<%= rsRep("iss_id")%>','IssueDetails','resizable=yes,width=580,height=500')" class="body_scol"><img src="images/i_drill_down.gif" width="12" height="14" hspace="3" border="0" align="absmiddle" alt="See issue details."><%=issNumDict.Item ( Cstr ( rsRep("iss_id") ) )%></a></td>
                        <td colspan='4' class="body_scol"></td>
              </tr>
                  <%
                        currIss_id = Cstr(rsRep("iss_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
              <tr>
                        <td class="body_row"></td>
                        <%If CDbl(rsRep("iss_state")) = enumISSUES_STATE_FIXED Then%>
                        <td align="right"><img src="images/i_tick.gif" width="7" height="7" hspace="6"></td>
                        <%Else%>
                        <td align="right"><img src='images/spacer.gif' width='7' height='7' hspace='6'></td>
                        <%End If%>
                <td nowrap class="body_row" valign="top"><a href="rep_find_package.asp?<%="group=Advanced_Search&repnum=4&action=true&FRpkg_name="& rsRep("pkg_name") &"&FRv_ext="& rsRep("v_ext")%>" class="txt_linked"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%><img src="images/i_drill_down.gif" width="12" height="14" hspace="3" border="0" align="absmiddle" alt="Find this package."></a></td>
                <td nowrap><%=rsRep("notes")%></td>
                        <td class="body_row"></td>
              </tr>
          <%  rsRep.MoveNext
          WEnd
          %>
          <tr>
        <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table>
        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If

End Sub
%>
<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Find a Package
' Description           :       Locate a package in Release Manager
' Form Input            :       Package Name, version extension
'==================================================================================
Sub Find_Package ( SSsection, SSpkg_name, SSv_ext )
        Dim Query_String, rsRep, oRegExp


        If SSsection = "TITLE" Then
                Response.write "Find a Package"
                Exit Sub
        End If


        If SSsection = "FORM" Then
        %>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
      <tr>
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
        <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
                HINTS:<br>
                - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
        <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
                e.g. .mas or .lvs or .oso or blank etc.</td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                <input type="hidden" name="group" value="<%=parGroup%>">
                <input type="hidden" name="repnum" value="<%=parRepNum%>">
                <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit">
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If


        If SSsection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub

                If SSpkg_name = "" Then SSpkg_name = "%"
                If SSv_ext = "" Then SSv_ext = "%"
                If Request("withwcard") <> "" Then SSpkg_name = "%"& Replace( SQLstring(SSpkg_name), "*", "") &"%"              'Place wild card automatically



                ' -- Check if this is PV_ID
                Set oRegExp = New RegExp

                oRegExp.Global = False  'Find only first match
            oRegExp.Pattern = "\D" 'Match number only


                If NOT oRegExp.Test(Request("FRpkg_name")) Then
                        Query_String = ReadFile( rootPath & "queries\rep_find_package_by_pv_id.sql" )
                        Query_String = Replace ( Query_String, "/*PV_ID*/", SQLstring(Request("FRpkg_name") )  )

                Else
                        Query_String = ReadFile( rootPath & "queries\rep_find_package.sql" )
                        Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
                        Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
                End If

                Response.Write(Query_String)
        %>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
                <td width="1%" nowrap class="body_colb">Location</td>
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
           <%
          Dim currPv_id
          currPv_id = -1
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )

          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='3' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If

          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY Package Version -----------------
                  If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
                  %>
              <tr>
                <td colspan="2" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td></td>
              </tr>
                  <tr>
                    <%If Request("withwcard") <> "" Then%>
                        <%' Highlight results for package search from index page%>
                <td nowrap class="body_scol"><%=Highlight_Substring ( rsRep("pkg_name"), Replace( SQLstring(SSpkg_name), "%", "") )  &" "& rsRep("pkg_version")%></td>
                        <%Else%>
                        <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
                        <%End If%>
                        <td colspan='2' class="body_scol"></td>
              </tr>
                  <%
                        currPv_id = Cstr(rsRep("pv_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
                  <%If NOT IsNull(rsRep("proj_name")) Then%>
              <tr>
                        <td class="body_row"></td>
                <td nowrap class="body_row" valign="top"><%=rsRep("proj_name") &" &gt; "& rsRep("vtree_name") &" &gt; "& rsRep("rtag_name") &" &gt; <a href='dependencies.asp?pv_id="& rsRep("pv_id") &"&rtag_id="& rsRep("rtag_id") &"' class='txt_linked'>"& rsRep("pkg_name") &" "& rsRep("pkg_version") &"</a>"%></td>
                        <td class="body_row"></td>
              </tr>
                  <%Else%>
                  <tr>
                        <td class="body_row"></td>
                <td class="body_row"></td>
                        <td class="body_row"></td>
              </tr>
                  <%End If%>
          <%  rsRep.MoveNext
          WEnd
          %>
          <tr>
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table>
        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If

End Sub
%>
<%
'==================================================================================
' Report Name           :       Find Package Version History
' Description           :       Locate all package versions and their current location
' Form Input            :       Package Name, version extension
'==================================================================================
Sub Find_Package_Version_History ( SSsection, SSpkg_name, SSv_ext )
        Dim Query_String, rsRep


        If SSsection = "TITLE" Then
                Response.write "Find Package Version History"
                Exit Sub
        End If


        If SSsection = "FORM" Then
        %>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
      <tr>
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
        <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
                HINTS:<br>
                - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
        <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
                e.g. .mas or .lvs or .oso or blank etc.</td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                <input type="hidden" name="group" value="<%=parGroup%>">
                <input type="hidden" name="repnum" value="<%=parRepNum%>">
                <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit">
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If


        If SSsection = "BODY" Then
                Const img_Official = "<img src='images/i_locked.gif' width='7' height='10' hspace='3' align='absmiddle'>"
                If NOT CBool(Request("action")) Then Exit Sub

                If SSpkg_name = "" Then SSpkg_name = "%"
                If SSv_ext = "" Then SSv_ext = "%"

                Query_String = ReadFile( rootPath & "queries\rep_package_version_history.sql" )
                Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
                Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
        %>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
            <td width="1%" nowrap class="body_colb" align="right">Official<%=img_Official%></td>
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
                <td width="1%" nowrap class="body_colb">Location</td>
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
           <%
          Dim currPv_id
          currPv_id = -1
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )

          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='4' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If

          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY Package Version -----------------
                  If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
                  %>
              <tr>
                <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td></td>
              </tr>
                  <tr>
                    <td align="right"><%If rsRep("dlocked") = "Y" Then%><%=img_Official%><%End If%></td>
                <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
                        <td colspan='2' class="body_scol"></td>
              </tr>
                  <%
                        currPv_id = Cstr(rsRep("pv_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
              <tr>
                    <td class="body_row"></td>
                        <td class="body_row"></td>
                        <%If IsNull(rsRep("rtag_id")) Then%>
                        <td nowrap class="body_txt_gray" valign="top">Not Used!</td>
                        <%Else%>
                                <td nowrap class="body_row" valign="top"><%=rsRep("proj_name") &" &gt; "& rsRep("vtree_name") &" &gt; "& rsRep("rtag_name") &" &gt; <a href='dependencies.asp?pv_id="& rsRep("pv_id") &"&rtag_id="& rsRep("rtag_id") &"' class='txt_linked'>"& rsRep("pkg_name") &" "& rsRep("pkg_version") &"</a>"%></td>
                        <%End If%>
                        <td class="body_row"></td>
              </tr>
          <%  rsRep.MoveNext
          WEnd
          %>
          <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table>
        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If

End Sub
%>
<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Obsolete Packages
' Description           :       List packages that are not used (exclude products)
' INPUT                         :       Project, Vesion Tree, Release Label
'==================================================================================
Sub Obsolete_Packages ( SSsection, NNproj_id, NNrtag_id )
        Dim Query_String, rsRep
        Const Allow_All = TRUE
        Const Disallow_All = FALSE

        If NNproj_id = "" Then NNproj_id = -1
        If NNrtag_id = "" Then NNrtag_id = -1

        If SSsection = "TITLE" Then
                Response.write "Unused Packages"
                Exit Sub
        End If


        If SSsection = "FORM" Then
        %>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
      <tr>
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field">Project</td>
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Release</td>
        <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
      </tr>
      <tr>
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit">
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If


        If SSsection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub

                Query_String = ReadFile( rootPath & "queries\rep_obsolete_packages.sql" )

                OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
        %>
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
                <td width="1%" nowrap class="body_colb">Released&nbsp;&nbsp;&nbsp;</td>
                <td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
           <%
          Dim currView_id
          currView_id = -1
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )

          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='5' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If
          
          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY BASE VIEW  -----------------
                  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
                  %>
              <tr> 
                <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td></td>
              </tr>
                  <tr> 
                <td nowrap class="body_scol"><%=rsRep("view_name")%></td>
                        <td class="body_scol"></td>
                        <td class="body_scol"></td>
                        <td class="body_scol"></td>
                        <td class="body_scol"></td>
              </tr>
                  <%
                        currView_id = CDbl(rsRep("view_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
              <tr> 
                        <td class="body_row"></td>
                <td nowrap class="body_row"><a href="used_by.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNrtag_id%>" class="txt_linked"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></a></td>
                <td nowrap class="body_row"><%=EuroDate( rsRep("modified_stamp") )%> by <a href="mailto:<%=rsRep("modifier_email")%>" class="txt_linked"><%=rsRep("modifier")%></a>&nbsp;&nbsp;&nbsp;</td>
                        <td nowrap class="body_row"><%=EuroDate( rsRep("insert_stamp") )%> by <a href="mailto:<%=rsRep("insertor_email")%>" class="txt_linked"><%=rsRep("insertor")%></a>&nbsp;&nbsp;&nbsp;</td>
                        <td class="body_row"></td>
              </tr>
          <%  rsRep.MoveNext
          WEnd
          %>
          <tr> 
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table>
        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If
        
End Sub
%>
<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Deployable Software Modules
' Description           :       Shows packages that are deployed to the customers and shows new packages marked as deployable.
' INPUT                         :       Project, Vesion Tree, Release Label, Base View (hard-coded to PRODUCTS)
'==================================================================================
Sub Deployable_Software_Modules ( sSection, nProj_id,  nRtag_id, nBase_view_id )
        Dim Query_String, rsRep
        Const Allow_All = TRUE
        Const Disallow_All = FALSE
        
        If nProj_id = "" Then nProj_id = -1
        If nRtag_id = "" Then nRtag_id = -1
        
        If sSection = "TITLE" Then
                Response.write "Deployable Software Modules"
                Exit Sub
        End If
        
        
        If sSection = "FORM" Then
        %>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
      <tr> 
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field">Project</td>
        <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
      </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Release</td>
        <td><%Call Get_Release_Labels ( nProj_id, nRtag_id, Disallow_All )%></td>
      </tr>
          <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Base View</td>
        <td><select name="noname" class='form_item' disabled>
                                <option>PRODUCTS</option>
                    </select></td>
      </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="FRbase_view_id" value="<%=enumBASE_VIEW_PRODUCTS%>">
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit"> 
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If
        
        
        If sSection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub
                '--- New Deployable Modules ---
                Query_String = ReadFile( rootPath & "queries\rep_new_deployable_packages.sql" )
                
                OraDatabase.Parameters.Add "RTAG_ID",           nRtag_id,               ORAPARM_INPUT, ORATYPE_NUMBER
                OraDatabase.Parameters.Add "BASE_VIEW_ID",      nBase_view_id,  ORAPARM_INPUT, ORATYPE_NUMBER
        %>
        <table width="100%"  border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td nowrap class="body_colb" colspan="3" background="images/bg_bage.gif">&nbsp;New Deployable Package</td>
      </tr>
      <tr>
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
          <tr>
        <td width="1%" class="body_txt">Package Name</td>
                <td width="1%" class="body_txt">Version</td>
                <td width="100%" class="body_txt">Last Modifier</td>
      </tr>
          <tr>
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
          <%
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
          %>
          <%If rsRep.RecordCount = 0 Then%>
          <tr>
        <td nowrap class="body_row" colspan="3">Found 0 records! </td>
      </tr>
          <%End If%>
          <%While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))%>
      <tr>
        <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="txt_linked"><img src="images/i_go2url.gif" width="14" height="14" hspace="3" border="0" align="absmiddle"><%=rsRep("pkg_name")%></a></td>
                <td nowrap class="body_row"><%=rsRep("pkg_version")%></td>              
                <td nowrap class="body_row"><%=rsRep("full_name")%></td>        
      </tr>
          <%rsRep.MoveNext
            WEnd
          rsRep.Close
          Set rsRep = Nothing%>
          <tr>
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
          <%
          ' Go To Release link...
          Query_String = _
          " SELECT proj.PROJ_NAME, rt.RTAG_NAME"&_
          "   FROM PROJECTS proj,"&_
          "                RELEASE_TAGS rt"&_
          "      WHERE rt.PROJ_ID = proj.proj_id"&_
          "        AND rt.rtag_id = :RTAG_ID"
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
          %>
      <tr>
        <td nowrap class="body_row" colspan="3"><a href="dependencies.asp?rtag_id=<%=nRtag_id%>"><img src="images/i_go2url.gif" width="14" height="14" hspace="3" border="0" align="absmiddle"></a>Go to <a href="dependencies.asp?rtag_id=<%=nRtag_id%>" class="txt_linked"><%=rsRep("proj_name")%> &gt; <%=rsRep("rtag_name")%></a> </td>
      </tr>
          <%
          rsRep.Close
          Set rsRep = Nothing%>
    </table>
        <br><br>
        <%
                '--- Current Deployable Modules ---
                Query_String = ReadFile( rootPath & "queries\rep_current_deployable_packages.sql" )
        %>
        <table width="100%"  border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td colspan="4" nowrap class="body_colb" background="images/bg_bage.gif">&nbsp;Current Deployable Packages </td>
      </tr>
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
          <%
          Dim currPv_id
          currPv_id = -1
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
          
          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='4' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If
          
          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY PRODUCT NAME  -----------------
                  If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
                  %>
      <tr>
        <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></a></td>
        <td>&nbsp;</td>
                <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
          <%
                        currPv_id = CDbl(rsRep("pv_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
      <tr>
        <td>&nbsp;</td>
        <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="txt_linked"><%=rsRep("dpkg_name")%></a></td>
                <td nowrap class="body_row"><%=rsRep("dpkg_version")%></td>
        <td nowrap class="err_alert"><%=rsRep("is_dep_deployable")%></td>
      </tr>
          <%  rsRep.MoveNext
          WEnd
          %>
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table> 
        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If
        
End Sub
%>

<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Bill Of Materials
' Description           :       List products for a BOM
' INPUT                         :       
'==================================================================================
Sub Bill_of_Materials ( SSsection, NNproj_id, NNrtag_id, NNbom_id, NNversion )
        Dim Query_String, rsRep, rsQry
        Const Allow_All = TRUE
        Const Disallow_All = FALSE
        
        If NNproj_id = "" Then NNproj_id = -1
        If NNrtag_id = "" Then NNrtag_id = -1
        If NNversion = "" Then NNversion = -1
        
        If SSsection = "TITLE" Then
                Response.write "BOM - History Track"
                Exit Sub
        End If
        
        
        If SSsection = "FORM" Then
        %>
        <script language="JavaScript" src="images/calendar.js"></script>        
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
      <tr> 
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field">Project</td>
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
      </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Release</td>
        <td><%Call Get_Release_labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
      </tr>
          <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">SBOM Version</td>
        <td><%Call Get_SBOM_Version ( NNproj_id, NNrtag_id, Disallow_All, NNversion )%></td>
      </tr> 
      <tr>
        <td colspan="3" nowrap class="form_field">Between 
        <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>"> 
                <A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRinitdate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a> 
        And 
        <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
        <A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRduedate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a></td>
                </tr>     
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="FRrtag_id" value="<%=NNrtag_id%>">
                        
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit"> 
        </td>
      </tr>
          </form>
    </table>
        <p>
      <%        Exit Sub
        End If
        
        
        
        OraDatabase.Parameters.Add "BRANCH_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
        OraDatabase.Parameters.Add "BOM_VERSION", Request("FRVersion"), ORAPARM_INPUT, ORATYPE_STRING
        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("rep_SBOM.sql"), cint(0))
        Dim bomId 
        bomId = rsQry("bom_id")
        rsQry.close
        Set rsQry = nothing     
        
        
        If SSsection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub
                
                'Query_String = ReadFile( rootPath & "queries\AllProducts.sql" )
                
                'OraDatabase.Parameters.Add "BOM_ID", bomId, ORAPARM_INPUT, ORATYPE_NUMBER
        %>
        </p>
        <table width="20%" border="0" cellspacing="0" cellpadding="2">
                <tr>
                                  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Trail</td>
                  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Date</td>
                  <td width="40%" background="images/bg_bage_0.gif" class="body_col" nowrap>Action</td>
                                  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>User</td>
                </tr>
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <%
         
          Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM BOM_TRAIL BT, USERS U WHERE BT.BOM_ID ="& bomId &" AND U.USER_ID = BT.USER_ID AND BT.DATE_TIME_STAMP >= TO_DATE('"& Request.Form("FRinitdate") &"','DD/MM/YYYY') AND BT.DATE_TIME_STAMP < TO_DATE('"& Request.Form("FRduedate") &"','DD/MM/YYYY')+1 ORDER BY BT.DATE_TIME_STAMP DESC", 0 )
        
        
          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        
                        
                        .write "<td colspan='5' class='body_row'>Found 0 bom trail records</td>"
                        .write "</tr>"
                End With
          Else
          %>
                <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td nowrap class="body_scol">Bom</td>
                <td nowrap class="body_scol"></td>        
        <td nowrap class="body_scol"></td>
        <td nowrap class="body_scol"></td>
      </tr>
          <%
          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  %>
      <tr>
                <td nowrap class="body_scol"></td>
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
                <td nowrap class="body_row"><%=rsRep("full_name")%></td>
      </tr>
      <%  rsRep.MoveNext
          WEnd
          End If
          %>
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <%
         
          Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM BOM_CONTENTS BC, NODE_TRAIL NT, USERS U WHERE BC.BOM_ID ="& bomId &" AND NT.NODE_ID = BC.NODE_ID AND U.USER_ID = NT.USER_ID AND NT.DATE_TIME_STAMP >= TO_DATE('"& Request.Form("FRinitdate") &"','DD/MM/YYYY') AND NT.DATE_TIME_STAMP < TO_DATE('"& Request.Form("FRduedate") &"','DD/MM/YYYY')+1 ORDER BY NT.DATE_TIME_STAMP DESC", 0 )
        
        
          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        
                        
                        .write "<td colspan='5' class='body_row'>Found 0 node trail records</td>"
                        .write "</tr>"
                End With
          Else  
          %>

      <tr>
        <td nowrap class="body_scol">Node</td>
                <td nowrap class="body_scol"></td>        
        <td nowrap class="body_scol"></td>
        <td nowrap class="body_scol"></td>
      </tr>
          <%
          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  %>
      <tr>
                <td nowrap class="body_scol"></td>
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
                <td nowrap class="body_row"><%=rsRep("full_name")%></td>
      </tr>
      <%  rsRep.MoveNext
          WEnd
          End If
          %>    
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>       
      <%
         
          Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM BOM_CONTENTS BC, OPERATING_SYSTEMS OS, OS_TRAIL OT, USERS U WHERE BC.NODE_ID = OS.NODE_ID AND OS.OS_ID = OT.OS_ID AND BC.BOM_ID ="& bomId &" AND U.USER_ID = OT.USER_ID AND OT.DATE_TIME_STAMP >= TO_DATE('"& Request.Form("FRinitdate") &"','DD/MM/YYYY') AND OT.DATE_TIME_STAMP < TO_DATE('"& Request.Form("FRduedate") &"','DD/MM/YYYY')+1 ORDER BY OT.DATE_TIME_STAMP DESC", 0 )
        
        
          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        
                        
                        .write "<td colspan='5' class='body_row'>Found 0 operating systems trail records</td>"
                        .write "</tr>"
                End With
          Else
          %>
                <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td nowrap class="body_scol">Operating System</td>
                <td nowrap class="body_scol"></td>        
        <td nowrap class="body_scol"></td>
        <td nowrap class="body_scol"></td>
      </tr>
          <%
          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  %>
      <tr>
                <td nowrap class="body_scol"></td>
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
                <td nowrap class="body_row"><%=rsRep("full_name")%></td>
      </tr>
      <%  rsRep.MoveNext
          WEnd
          End If
          %>     
      <tr>
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>          
    </table>
        <p>&nbsp;         </p>
        <p>        <!-- PRINT, SAVE, ETC. ------------>
      <%If parPrint = "" Then%>
      <br>
      <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
      <br>
      <%End If%>
      <!-- PRINT, SAVE, ETC. END -------->
      <%
                rsRep.Close
                Set rsRep = nothing
        End If
        
End Sub
%>

<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Build History
' Description           :       List packages which were build between certain dates.
' INPUT                         :       
'==================================================================================
Sub Build_History ( SSsection, NNproj_id, NNrtag_id)
        Dim Query_String, rsRep, rsQry
        Const Allow_All = TRUE
        Const Disallow_All = FALSE
        
        If NNproj_id = "" Then NNproj_id = -1
        If NNrtag_id = "" Then NNrtag_id = -1
        
        If SSsection = "TITLE" Then
                Response.write "Build History"
                Exit Sub
        End If
        
        
        If SSsection = "FORM" Then
        %>
        <script language="JavaScript" src="images/calendar.js"></script>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=SCRIPT_NAME%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
      <tr> 
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field">Project</td>
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>

      </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Release</td>
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>

      </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">SBOM Version</td>
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
      </tr>       
      <tr>
        <td colspan="3" nowrap class="form_field">Between 
        <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>"> 
                <A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRinitdate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a> 
        And 
        <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
        <A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRduedate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a></td>
                </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit" onClick="clickedButton=true;MM_validateForm('FRduedate','Due Date','R','FRmsg','Message details','R');return document.MM_returnValue"> 
        </td>
      </tr>
          </form>
    </table>
        <p>
      <%        Exit Sub
        End If
        

        If SSsection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub
        %>
        </p>
        <table width="20%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td width="1%" nowrap class="body_colb">&nbsp;</td>       
        <td width="5%" nowrap class="body_colb">Package</td>
        <td width="95%" nowrap class="body_colb">Version</td>
      </tr>
      <tr>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>                         
      </tr>
      <%
          Dim currView_id
          currView_id = -1
          
                OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
                OraDatabase.Parameters.Add "INITDATE", Request.Form("FRinitdate"), ORAPARM_INPUT, ORATYPE_STRING
                OraDatabase.Parameters.Add "DUEDATE", Request.Form("FRduedate"), ORAPARM_INPUT, ORATYPE_STRING
          
          Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("rep_build_history.sql"), cint(0) )
          
          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='5' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If
  
          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  ' -------- GROUP BY BASE VIEW  -----------------
                  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
                  %>
      <tr>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>         
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
        
       <tr>
        <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
        <td>&nbsp;</td>
                <td>&nbsp;</td>

      </tr>

      <%
                        currView_id = CDbl(rsRep("view_id"))
                  End If
                  ' -------- END GROUP ------------------------
                  %>
      <tr>
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
        <td nowrap class="body_row"><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_name")%></strong></a></td>
        <td nowrap class="body_row"><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_version")%></strong></a></td>
      </tr>
      <%  rsRep.MoveNext
          WEnd
          %>
      <tr>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>                         
      </tr>
    </table>
        <p>&nbsp;         </p>
        <p>        <!-- PRINT, SAVE, ETC. ------------>
      <%If parPrint = "" Then%>
      <br>
      <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
      <br>
      <%End If%>
      <!-- PRINT, SAVE, ETC. END -------->
      <%
                rsRep.Close
                Set rsRep = nothing
        End If
        
End Sub
%>


<%
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==================================================================================
' Report Name           :       Unit Tests per Package
' Description           :       List unit tests per package showing the unit test completeness
' INPUT                         :       Project, Vesion Tree, Release Label, Base View, Level of Completeness, Show/Hide Dependencies, PV_ID
'==================================================================================
Sub Unit_Tests_Per_Package ( sSection, nProj_id,  nRtag_id, nBase_view_id, nLevel_of_complete, nShow_dependencies, nPv_id )
        Dim Query_String, rsRep
        Const Allow_All = TRUE
        Const Disallow_All = FALSE
        
        If nProj_id = "" Then nProj_id = -1
        If nRtag_id = "" Then nRtag_id = -1
        If nShow_dependencies = "" Then nShow_dependencies = 0
        If nPv_id = "" Then nPv_id = -1
        
        If sSection = "TITLE" Then
                Response.write "Unit Tests per Package"
                Exit Sub
        End If
        
        
        If sSection = "FORM" Then
        %>
    </p>
        <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
      <tr> 
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
        <td width="1%" align="right" nowrap class="form_field">Project</td>
        <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
      </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Release</td>
        <td><%Call Get_Release_Labels ( nProj_id,  nRtag_id, Disallow_All )%></td>
      </tr>
          <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Base View</td>
        <td><%Call Get_Base_Views ( nRtag_id, nBase_view_id, Allow_All )%></td>
      </tr>
          <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">Show Dependencie's Unit Tests</td>
        <td><input type="checkbox" name="FRshow_deps" value="1" <%If nShow_dependencies <> 0 Then%>checked<%End If%>></td>
      </tr>
      <tr> 
        <td nowrap class="form_field">&nbsp;</td>
        <td align="right" nowrap class="form_field">&nbsp;</td>
        <td><br>
                        <input type="hidden" name="group" value="<%=parGroup%>">
                        <input type="hidden" name="repnum" value="<%=parRepNum%>">
                        <input type="hidden" name="FRtest_complete" value="0">
                        <input type="hidden" name="action" value="true">
                <input name="Submit" type="submit" class="form_btn" value="Submit"> 
        </td>
      </tr>
          </form>
    </table>
        <%      Exit Sub
        End If
        
        
        If sSection = "BODY" Then
                If NOT CBool(Request("action")) Then Exit Sub
                
                Query_String = ReadFile( rootPath & "queries\rep_unit_tests_per_package.sql" )
                
                OraDatabase.Parameters.Add "RTAG_ID",           nRtag_id,               ORAPARM_INPUT, ORATYPE_NUMBER
                OraDatabase.Parameters.Add "BASE_VIEW",         nBase_view_id,  ORAPARM_INPUT, ORATYPE_NUMBER
                OraDatabase.Parameters.Add "COMPLETENESS",      nLevel_of_complete, ORAPARM_INPUT, ORATYPE_NUMBER
                OraDatabase.Parameters.Add "SHOW_DEPS",         nShow_dependencies, ORAPARM_INPUT, ORATYPE_NUMBER
                OraDatabase.Parameters.Add "PV_ID",             nPv_id,                 ORAPARM_INPUT, ORATYPE_NUMBER
        %>
        <table width="100%" border="0" cellspacing="0" cellpadding="1">
      <tr>
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
        <td width="1%" nowrap class="body_colb">Test Name&nbsp;&nbsp;&nbsp;</td>
        <td width="100%" nowrap class="body_colb">Test Summary&nbsp; </td>
        <td width="1%" nowrap class="body_colb"></td>
        <td width="1%" nowrap class="body_colb">Stamp</td>
        <td width="1%" nowrap class="body_colb">Test Completed &nbsp;&nbsp;&nbsp;</td>
      </tr>
      <tr>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
          <%
          Dim currBase_view_id, currPv_id, currDpv_id, showTests
          currBase_view_id = -1
          currPv_id = -1
          currDpv_id = -1
          
          Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
          
          If rsRep.RecordCount = 0 Then
                With Response
                        .write "<tr>"
                        .write "<td colspan='9' class='body_row'>Found 0 records</td>"
                        .write "</tr>"
                End With
          End If
          
          While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
                  If nShow_dependencies <> 0 Then
                        ' show dependency is ON
                        If rsRep("dpkg_name") = "------" Then
                                showTests = FALSE
                        Else
                                showTests = TRUE
                        End If
                  Else
                        showTests = TRUE
                  End If
                  
                  ' -------- GROUP BY BASE VIEW  -----------------
                  If CDbl(currBase_view_id) <> CDbl(rsRep("base_view_id")) Then
                  %>
          <tr>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
       <tr>
        <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
        <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
      </tr>
              <%
                        currBase_view_id = CDbl(rsRep("base_view_id"))
                  End If
                  ' -------- END GROUP BASE VIEW ------------------------
                  %>
                  <%
                  ' -------- GROUP BY PACKAGE  -----------------
                  If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
                  %>
      <tr>
        <td><img src="images/spacer.gif" width="1" height="1"></td>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><%If rsRep("dlocked") = "Y" Then%><img src="images/i_locked.gif" width="7" height="10" hspace="2" alt="Officially released."><%Else%><img src="images/spacer.gif" width="7" height="10" hspace="2"><%End If%></td>
        <td nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_name")%></strong></a></td>
        <td nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_version")%></strong></a></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="center" valign="top" nowrap><%If nShow_dependencies = 0 Then%><%If IsNull( rsRep("not_done") ) Then%><img src="images/i_boxtick_on.gif" width="13" height="13"><%Else%><img src="images/i_boxtick_off.gif" width="13" height="13"><%End If%><%End If%></td>
      </tr>
              <%
                        currPv_id = CDbl(rsRep("pv_id"))
                  End If
                  ' -------- END GROUP PACKAGE ------------------------
                  %>
                  <%
                  ' -------- GROUP BY DEPENDENCY  -----------------
                  If Not IsNull(rsRep("dpv_id")) Then
                        If CDbl(currDpv_id) <> CDbl(rsRep("dpv_id")) Then
                  %>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td valign="top" nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("dpkg_name")%></strong></a></td>
        <td valign="top" nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("dpkg_version")%></strong></a></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="center" valign="top" nowrap><%If IsNull( rsRep("not_done") ) Then%><img src="images/i_boxtick_on.gif" width="13" height="13"><%Else%><img src="images/i_boxtick_off.gif" width="13" height="13"><%End If%></td>
      </tr>
              <%
                                currDpv_id = CDbl(rsRep("dpv_id"))
                        End If
                  End If
                  ' -------- END GROUP DEPENDENCY ------------------------
                  %>
          <%If Not IsNull( rsRep("completed_by") ) AND showTests Then%>
          <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
        <td bgcolor="#F5F5F5" valign="top" nowrap class="body_row"><img src="images/i_test.gif" width="16" height="16" hspace="1" align="absmiddle"><%=rsRep("test_name")%></td>
        <td bgcolor="#F5F5F5" valign="top" class="body_row"><%=NewLine_To_BR ( To_HTML ( rsRep("test_summary") ) )%></td>
        <td bgcolor="#F5F5F5" align="center" valign="top">      </td>
        <td bgcolor="#F5F5F5" valign="top" nowrap class="body_txt"><%=EuroDate ( rsRep("completion_date") )%> <a href="mailto:<%=rsRep("user_email")%>" class="txt_linked"><%=rsRep("completed_by")%></a> </td>
        <td>&nbsp;</td>
      </tr>
          <tr>
        <td><img src="images/spacer.gif" width="1" height="1"></td>
        <td><img src="images/spacer.gif" width="1" height="1"></td>
                <td><img src="images/spacer.gif" width="1" height="1"></td>
                <td><img src="images/spacer.gif" width="1" height="1"></td>
                <td><img src="images/spacer.gif" width="1" height="1"></td>
                <td><img src="images/spacer.gif" width="1" height="1"></td>
                <td><img src="images/spacer.gif" width="1" height="1"></td>
                <td><img src="images/spacer.gif" width="1" height="1"></td>
                <td><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
          <%End If%>
          <%  rsRep.MoveNext
          WEnd
          %>
      <tr>
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>
    </table> 

        <!-- PRINT, SAVE, ETC. ------------>
        <%If parPrint = "" Then%>
        <br>
        <br>
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
        <br>
        <%End If%>
        <!-- PRINT, SAVE, ETC. END -------->
        <%
                rsRep.Close
                Set rsRep = nothing
        End If
        
End Sub
%>