<%@ LANGUAGE = "VBScript" %> <% Session.Timeout = 120 Server.ScriptTimeout = 5000 fechainicial=Request.Querystring("fecini") fechafinal=Request.Querystring("fecfin") %> <% Response.Buffer = TRUE Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "content-disposition", "inline; filename=Corr1_result"&date()&time()&".xls" %> Report Corrugator
Corrugator Machine Production
Date: <%=Date_ini%> To: <%=Date_end%> Generated: <%=time%>
<% '************** Inventory 'lturno=0 Dim Rsinven1, Rsinven2, rswip, Rsmachine Dim Sqlinven1, sqlinven2, sqlwip ''''''''''''''''''''''''''''''''''''''' set Rscorr=dbsqlcorr.execute("select GOL,JIJG,JANG,WPOK,QTY,PQTY,SUJUNO,JOBYMD,CUST,BOX_NM,eqty,jtime,dtime,JOBJO from SHPSOUT(nolock) where jobymd between '" & fechainicial & "' and '" & fechafinal & "' order by JOBYMD,JOBJO") If Rscorr.EOF And Rscorr.BOF Then response.Write("No records exist for corr. this date.") Else %>
<% TOTML=0 TOTM2=0 Rscorr.movefirst Do While Not Rscorr.EOF %> <% totalTiempo = Rscorr("dtime") hores = int((totalTiempo/3600)) aux = int(totalTiempo-(3600*hores)) minuts = int(aux/60) segons = totalTiempo-hores*3600-minuts*60 Downtime = hores&":"&right("00"&minuts,2)&":"&right("00"&segons,2) Tiempo2 = Rscorr("jtime") hores2 = int((Tiempo2/3600)) aux2 = int(Tiempo2-(3600*hores2)) minuts2 = int(aux2/60) segons2 = Tiempo2-hores2*3600-minuts2*60 Worktime = hores2&":"&right("00"&minuts2,2)&":"&right("00"&segons2,2) %> <% TOTTARGET=TOTTARGET+Rscorr("QTY") TOTPROD=TOTPROD+Rscorr("PQTY") TOTML=TOTML+(Rscorr("JANG")*Rscorr("PQTY")/1000) TOTM2=TOTM2+(Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000) TOTbad=TOTbad+Rscorr("eQTY") TOTjtime=TOTjtime+Rscorr("jtime") TOTdtime=TOTdtime+Rscorr("dtime") RsCORR.MoveNext LOOP END IF rscorr.close set rscorr = nothing '''''''''''''''''''''''' Tiempod = TOTdtime hores3 = int((Tiempod/3600)) aux3 = int(Tiempod-(3600*hores3)) minuts3 = int(aux3/60) segons3 = Tiempod-hores3*3600-minuts3*60 totdt = hores3&":"&right("00"&minuts3,2)&":"&right("00"&segons3,2) Tiempow = totjtime hores4 = int((Tiempow/3600)) aux4 = int(Tiempow-(3600*hores4)) minuts4 = int(aux4/60) segons4 = Tiempow-hores4*3600-minuts4*60 totwt = hores4&":"&right("00"&minuts4,2)&":"&right("00"&segons4,2) %>
CORRUGATOR I
PROD DATE(JOBYMD) SHIFT (JOBJO) ORDER NO.(SUJUNO) CUSTOMER(CUST) BOX ITEM(BOX_NM) FLUTE(GOL) PAPER COMBINATION(JIJG) LENGTH(JANG) WIDTH(WPOK) TARGET(QTY) PROD QTY(PQTY) TOTAL LENGTH (M) TOTAL M2 Bad Qty(EQTY) Work Hr Stop Hr
<%= Rscorr("JOBYMD")%> <%= Rscorr("JOBJO")%> <%= Rscorr("SUJUNO")%> <%= Rscorr("CUST")%> <%= Rscorr("BOX_NM")%> <%= Rscorr("GOL")%> <%= Rscorr("JIJG")%> <%= Rscorr("JANG")%> <%= Rscorr("WPOK")%> <%= Rscorr("QTY")%> <%= Rscorr("PQTY")%> <%= formatnumber((Rscorr("JANG")*Rscorr("PQTY")/1000),0)%> <%= formatnumber((Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000),0) %><%= Rscorr("EQTY")%> <%= worktime%> <%= downtime%>
                 
<%=FORMATNUMBER(TOTTARGET,0)%> 
<%=FORMATNUMBER(TOTPROD,0) %> 
<%=FORMATNUMBER(TOTML,0) %> M
<%=FORMATNUMBER(TOTM2,0) %> M2
<%=FORMATNUMBER(TOTbad,0) %> 
<%=TOTwt %> hrs
<%=TOTdt %> hrs