R
Rajani
Hello,
First of all sorry for the long code. But i want to explain clearly what i
am doing.
For i = 0 To UBound(arrResSizes) - 1
For j = 0 To UBound(arrqty) - 1
For k = 1 To totopr Step 8
tempjob = right(jc,5)
tempsize = left(arrResSizes(i) & " ", 3)
headsize = left(arrResSizes(i) & " ", 6)
tempqty = Right(" " & CStr(arrqty(j)), 2)
templay = Right(" " & CStr(lno), 3)
tempbdl = Right(" " & bdlno, 5)
tempopr = Right("00" & k, 2)
'tempcolor = Left(getColorName(arrColorCodes(j)) & "
", 6)
tempcolor=left(dict.Item(cstr(arrColorCodes(j))) & "
",6)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & headsize & " "
If (k + 1) <= totopr Then
tempopr = Right("00" & k + 1, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
If (k + 2) <= totopr Then
tempopr = Right("00" & k + 2, 2)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & tempqty & " PCS" & " "
Else
strop = strop & "
" & tempqty & " PCS "
End If
If (k + 3) <= totopr Then
tempopr = Right("00" & k + 3, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
If (k + 4) <= totopr Then
tempopr = Right("00" & k + 4, 2)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & tempcolor & " "
Else
strop = strop & "
" & tempcolor
End If
If (k + 5) <= totopr Then
tempopr = Right("00" & k + 5, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
If (k + 6) <= totopr Then
tempopr = Right("00" & k + 6, 2)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & tempjob & " "
Else
strop = strop & "
" & tempjob
End If
If (k + 7) <= totopr Then
tempopr = Right("00" & k + 7, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
Next
bdlno = bdlno + 1
rowcounter = 1
Next
Next
The first loop may be having 5 iterations(0 to 5)
Second - (0 to 20)
third may be (1 to 52)
Its taking so much time to produce the final output(nearly 5 mts). I got an
error initially "Script timeout". I have set the value to 180
"server.scripttimeout=180" Now its ok. But taking some long time to display
output. Even in the server itself.
Some times the first loop may be 0 to 12
Is my coding is wrong? or any other sollution is there to get the fast
output for this?
Pls help me. After executing i am saving the output(strop) in a text file
using FSO(that my need).
Thanks in advance.
The output could be liek this
http://m.1asphost.com/tsimsha/tickets.txt
First of all sorry for the long code. But i want to explain clearly what i
am doing.
For i = 0 To UBound(arrResSizes) - 1
For j = 0 To UBound(arrqty) - 1
For k = 1 To totopr Step 8
tempjob = right(jc,5)
tempsize = left(arrResSizes(i) & " ", 3)
headsize = left(arrResSizes(i) & " ", 6)
tempqty = Right(" " & CStr(arrqty(j)), 2)
templay = Right(" " & CStr(lno), 3)
tempbdl = Right(" " & bdlno, 5)
tempopr = Right("00" & k, 2)
'tempcolor = Left(getColorName(arrColorCodes(j)) & "
", 6)
tempcolor=left(dict.Item(cstr(arrColorCodes(j))) & "
",6)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & headsize & " "
If (k + 1) <= totopr Then
tempopr = Right("00" & k + 1, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
If (k + 2) <= totopr Then
tempopr = Right("00" & k + 2, 2)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & tempqty & " PCS" & " "
Else
strop = strop & "
" & tempqty & " PCS "
End If
If (k + 3) <= totopr Then
tempopr = Right("00" & k + 3, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
If (k + 4) <= totopr Then
tempopr = Right("00" & k + 4, 2)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & tempcolor & " "
Else
strop = strop & "
" & tempcolor
End If
If (k + 5) <= totopr Then
tempopr = Right("00" & k + 5, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
If (k + 6) <= totopr Then
tempopr = Right("00" & k + 6, 2)
strop = strop & tempjob & " " & tempsize & " " &
tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
& " " & tempjob & " "
Else
strop = strop & "
" & tempjob
End If
If (k + 7) <= totopr Then
tempopr = Right("00" & k + 7, 2)
strop = strop & tempopr & " " & tempjob & " " &
tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
vbcrlf & vbcrlf & vbcrlf
Else
strop = strop & vbcrlf & vbcrlf & vbcrlf
End If
Next
bdlno = bdlno + 1
rowcounter = 1
Next
Next
The first loop may be having 5 iterations(0 to 5)
Second - (0 to 20)
third may be (1 to 52)
Its taking so much time to produce the final output(nearly 5 mts). I got an
error initially "Script timeout". I have set the value to 180
"server.scripttimeout=180" Now its ok. But taking some long time to display
output. Even in the server itself.
Some times the first loop may be 0 to 12
Is my coding is wrong? or any other sollution is there to get the fast
output for this?
Pls help me. After executing i am saving the output(strop) in a text file
using FSO(that my need).
Thanks in advance.
The output could be liek this
http://m.1asphost.com/tsimsha/tickets.txt