<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/enrgise-html.tld" prefix="enrgise" %>

<%@ page import="wenrgise.common.utility.ReportReader" %>
<%@ page import="wenrgise.common.utility.ParamUtil" %>
<%@ page import="java.lang.String" %>

<html:html>
	<HEAD>
  <html:base/>
		<TITLE><bean:message key="hrm.title" /></TITLE>
     <jsp:include page = "GenIncludes.jsp" />
     <meta http-equiv=pragma content=no-cache>
</head>


<BODY scroll="auto" onkeydown="hotKeys(event);";>

<html:form  action="RepLeaveLedgerJasperAction" name="frmRepAllIndiaManpower" type="wenrgise.hrms.webtier.form.RepAllIndiaManpowerForm" scope="session">
<bean:define id="ParentForm" name="frmRepAllIndiaManpower" toScope="request" />
<jsp:include page="GenIconMenu.jsp" flush="true" />


<enrgise:errors/>
<logic:messagesPresent message="true">
<Table>
    <html:messages id="message" message="true">
    <TR><TD>
      <bean:write name="message"/>
    </TD></TR>
    </html:messages>      
</Table>
</logic:messagesPresent>
<table>
<TR height=30>
  <TD  colSpan=12 class=mainHeader height=10>ALL INDIA MANPOWER DETAILS REPORT</TD>
</TR>
</TABLE>

<TABLE cellSpacing=0 cellPadding=0 border=0 >
<TBODY>
  <TR>
    <TD>
  <!-- Body table Starts -->
       <TABLE cellSpacing=0 cellPadding=0 >
       <!--Account  Header Row Starts -->
       <TR>
          <TD class=subHeader colspan=6> Manpower Details Report </TD>
        </TR>
        <TR>
              <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
	      </TR>

         <tr height="15" >
            <td colspan="6"></td>
         </tr>

       <!-- <tr>
              <td width=40% class="labelText"><bean:message key="hrm.Report.txtYYMM" /></td>
              <td width=60% colspan=6><html:text property="txtYYMM" titleKey="hrm.Report.txtYYMM" alt="P" maxlength="20" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" property="buttxtYearMonth" name="frmRepAllIndiaManpower" /></td>
        </tr>-->

   	 </table>
    </div>

 <table cellspacing=0 cellpadding=0 border=0>
         <!-- Detail Information Row starts -->

 	 <TR height="100">
            <TD colspan=11>

            <!-- Account Config Detail Table Starts -->
           <TABLE cellspacing="0" cellPadding="0" >

              <TR height=10>

		<!-- Detail table Container starts -->
                <TD colspan="16">

		  </td>
               </tr>

<!-- Tab table Row 3 starts -->
               <tr>
		
		</TR>
    <TR>
     <TD align=right bgColor=#4682b4 colSpan=16><IMG height=1 src="../includes/images/pixel.gif" width=1  border=0></TD>
    </TR>

</TABLE>
        </td>
	</tr>

<!-- Bottom Blue Bar -->
         <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr>
                        <td width=40% align=center bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                        <!--td width=60% bgColor=#4682b4><input class=bottomBarText type=button value="   Generate Report   " onclick="doGetReport();" ></td-->
                        <td width=60% bgColor=#4682b4><input class=bottomBarText type=button value="   View Report   " onclick="viewReport();" ></td>
                        <!--<td width=60% bgColor=#4682b4><input class=bottomBarText type=button value="   Download Excel   " onclick="downloadReport();" ></td>-->
                        <td width=60% bgColor=#4682b4><input class=bottomBarText type=button value="   Download CSV   " onclick="downloadCSV();" ></td>
                        <td width=60% bgColor=#4682b4><input class=bottomBarText type=button value="   Download PDF   " onclick="downloadPDF();" ></td>
                       
                   </TR>
                </table>
            </td>
          </tr>

</TABLE>

<!-- Container Table Ending Columns Starts-->
    </TD>

</TR>
</TBODY>
</TABLE>

<!-- Container Table Ends -->

<html:hidden name="frmRepAllIndiaManpower"  property="screenName" value="RepLeaveLedger" />

<html:hidden property="screenMode" name="frmRepAllIndiaManpower" value="Q" />
<html:hidden property="positionRequested" name="frmRepAllIndiaManpower" />
<html:hidden property="userPageRequested" name="frmRepAllIndiaManpower" />
<html:hidden property="userPositionRequested" name="frmRepAllIndiaManpower" />
<html:hidden property="pageRequested" name="frmRepAllIndiaManpower" />
<html:hidden property="headerDataChanged" name="frmRepAllIndiaManpower" />
<html:hidden property="detailDataChanged" name="frmRepAllIndiaManpower" />
<html:hidden property="lovKey" name="frmRepAllIndiaManpower"  />
<html:hidden property="firstLoad" name="frmRepAllIndiaManpower"  /> 
<html:hidden property="txtSearchFields" name="frmRepAllIndiaManpower"  />
<html:hidden property="txtDisplayFields" name="frmRepAllIndiaManpower"  />
<html:hidden property="txtIndex" name="frmRepAllIndiaManpower"  />
<html:hidden property="headerPrimaryKey" name="frmRepAllIndiaManpower"  />
<html:hidden property="buttonName" name="frmRepAllIndiaManpower"  />
<input type="hidden" name="reportPath" value="/hrms/report/Leave_Ledger.jasper"/>
<input type="hidden" name="pdfOutPath" value="c:/"/>
<input type="hidden" name="reportName" value="Leave_Ledger"/>
<input type="hidden" name="DOWNLOAD" value="E"/>


</html:form>
</body>
</html:html>

<script language="javascript">


function viewReport(){
    var button = document.getElementsByName('button');
    button.value='Download';
    var downloadOption = '';
	  var downloadField = document.getElementsByName("DOWNLOAD");
    downloadField.value = downloadOption;
    var target = '/hrms/RepLeaveLedgerJasperAction.do?reportName=Leave_Ledger&reportPath=/hrms/report/Leave_Ledger.jasper';
    var w = window.open(target);
    w.resizeTo(screen.width,screen.height);
}
function downloadPDF(){
    var button = document.getElementsByName('button');
    button.value='Download';
    var downloadOption = '';
	  var downloadField = document.getElementsByName("DOWNLOAD");
    downloadField.value = downloadOption;
    var target = '/hrms/RepLeaveLedgerJasperAction.do?reportName=Leave_Ledger&reportPath=/hrms/report/Leave_Ledger.jasper&DOWNLOAD=P';
    var w = window.open(target);
    w.resizeTo(screen.width,screen.height);
}
function downloadCSV(){
    var button = document.getElementsByName('button');
    button.value='Download';
    var downloadOption = '';
	  var downloadField = document.getElementsByName("DOWNLOAD");
    downloadField.value = downloadOption;
    var target = '/hrms/RepLeaveLedgerJasperAction.do?reportName=Leave_Ledger&reportPath=/hrms/report/Leave_Ledger.jasper&DOWNLOAD=C';
    var w = window.open(target);
    w.resizeTo(screen.width,screen.height);
}
function downloadReport(){
    var button = document.getElementsByName('button');
    button.value='Download';
    var downloadOption = '';
	  var downloadField = document.getElementsByName("DOWNLOAD");
    //downloadField.value = downloadOption;
    //document.forms[0].submit();
    var target = '/hrms/RepLeaveLedgerJasperAction.do?reportName=Leave_Ledger&reportPath=/hrms/report/Leave_Ledger.jasper&DOWNLOAD=E';
    var w = window.open(target);
    w.resizeTo(screen.width,screen.height);
}
function doValidate()
{  
 return "RepLeaveLedgerValidate.do"; 
  
}

function lfnLoad()
{  
  if(document.forms[0].firstLoad.value=="")
  {
   doBaseOnLoad();  
  }  
}
function doOnLoad()
{
  return  "RepLeaveLedgerOnLoadAction.do";
}
function doExit()
{
  return  "RepAllIndiaManpowerExitAction.do";
}

</script>

    
