Spero che il titolo sia giusto...
Utilizzo la "famosa" procedura ASP per invio dei fax (quella che funziona solo su Win 2003). Funziona tutto a meraviglia (tra l'altro anche con due linee fax), ma c'è una cosa che non va.
Premetto che il codice non l'ho implementato io.
Ho una form che mi visualizza lo stato dell'invio, divisa in due parti
1. Fax inviati (identificata come "TABELLA FAX INVIATI")
2. Fax in fase di invio e/o in stato di errore (identificata come "TABELLA FAX IN CODA")
In entrambe le parti della form, ho necessità di visualizzazare al posto del numero di telefono, la descrizione dell'azienda a cui invio il fax.
Non vi sto a spiegare come recupero tale descrizione e nemmeno dove prendo il numero, ma utilizzo un file esterno (listnumeazie.asp) opportunamente generato in questo modo
Ora questo file lo includo nel file della form di visualizzazione.codice:<% if left(objFaxOutgoingMessage.Recipient.FaxNumber,inStr(objFaxOutgoingMessage.Recipient.FaxNumber,"_")-1)="9,1111111" then %> Ditta 1 <% else if left(objFaxOutgoingMessage.Recipient.FaxNumber,inStr(objFaxOutgoingMessage.Recipient.FaxNumber,"_")-1)="9,222222" then %> Ditta 2 <% else if left(objFaxOutgoingMessage.Recipient.FaxNumber,inStr(objFaxOutgoingMessage.Recipient.FaxNumber,"_")-1)="9,33333" then %> Ditta 3 <% end if end if end if %>
Il problema è che... sulla parte 1 funziona a meraviglia, mentre nella parte 2, mi visualizza sempre e solo la prima aziendaVVoVe:
Vi è capitato lo stesso problema?
Qualche consiglio.
Grazie mille!
Di seguito posto la parte di codice della form, della parte 1 e della parte 2
codice:<% '****************** 'questo codice recupera i dati dall'archivio fax inviati '****************** Set objFaxServer = CreateObject("FaxComEx.FaxServer") objFaxServer.Connect "" Prefetch=2000 Set objFolder = objFaxServer.Folders Set objOutgoingArchive = objFolder.OutgoingArchive 'Refresh the archive objFaxServer.Folders.OutgoingArchive.Refresh Set objFaxOutgoingMessageIterator = objFaxServer.Folders.OutgoingArchive.GetMessages(Prefetch) on error resume next %> <tr class="intesta"> <td width="15%" align="center"> Destinatario </td> <td width="15%" align="center"> Bollettino </td> <td width="14%" align="center"> Pagine </td> <td width="14%" align="center"> N. Fax </td> <td width="14%" align="center"> Inizio invio </td> <td width="14%" align="center"> Fine invio </td> </tr> <% For i = 1 To Prefetch 'Get the message If objFaxOutgoingMessageIterator.AtEOF = True Then else Set objFaxOutgoingMessage = objFaxOutgoingMessageIterator.Message %> <tr > <td width="15%" align="center" class="testolista"> </td> <td width="15%" align="center" class="testolista"> <%=objFaxOutgoingJob.DocumentName%> </td> <td width="14%" align="center" class="testolista"> <%=objFaxOutgoingMessage.Pages%> </td> <td width="14%" align="center" class="testolista"> <%=left(objFaxOutgoingMessage.Recipient.FaxNumber,inStr(objFaxOutgoingMessage.Recipient.FaxNumber,"_")-1)%> </td> <!-- <td width="14%" align="center" class="testolista"> <%=objFaxOutgoingMessage.SubmissionTime%> </td> --> <td width="14%" align="center" class="testolista"> <%=objFaxOutgoingMessage.TransmissionStart%> </td> <td width="14%" align="center" class="testolista"> <%=objFaxOutgoingMessage.TransmissionEnd %> </td> </tr> <% end if objFaxOutgoingMessageIterator.MoveNext Next %> </table> <table border="1" width="100%"> <tr class="intesta"> <td width="100%" colspan="7" align="center"> Fax In Coda </td> </tr> <% Function statofaxx(codierro) Dim vc_statofaxx ' verifico estensione del file .zip .word ecc Select Case codierro Case "0" vc_statofaxx = "In Attesa" Case "1" vc_statofaxx = "Disconnesso" Case "2" vc_statofaxx = "In Corso" Case "3" vc_statofaxx = "In Corso" Case "4" vc_statofaxx = "In Corso" Case "5" vc_statofaxx = "In Arrivo" Case "6" vc_statofaxx = "In Arrivo" Case "7" vc_statofaxx = "Linea non presente" Case "8" vc_statofaxx = "Occupato" Case "9" vc_statofaxx = "Nessuna Risposta" Case "10" vc_statofaxx = "Numero non Valido" Case "11" vc_statofaxx = "Nessun Segnale" Case "12" vc_statofaxx = "Errore di protocollo" Case "13" vc_statofaxx = "Fax Eliminato" Case "14" vc_statofaxx = "Numero riservato per emergenze" Case "15" vc_statofaxx = "Chiamata in arrivo non da fax" Case "16" vc_statofaxx = "Fax ricevuto in modo parziale" Case "17" vc_statofaxx = "In Corso" Case "18" vc_statofaxx = "Invio Completato" Case "19" vc_statofaxx = "Chiamata Interrotta" Case Else vc_statofaxx = "Errore generico" End Select statofaxx = vc_statofaxx End Function '************ 'file dell archivio file in coda '************* Set objFaxServer = CreateObject("FaxComEx.FaxServer") objFaxServer.Connect "" Set objFolder = objFaxServer.Folders Set objOutgoingArchive = objFolder.OutgoingArchive 'Connect to the fax server objFaxServer.Connect "" 'Get the outgoing queue object Set objFaxOutgoingQueue = objFaxServer.Folders.OutgoingQueue 'Refresh the queue object objFaxOutgoingQueue.Refresh n = objFaxOutgoingQueue.GetJobs.Count 'Get the job based on the item number 'response.write n&" totale " %> <tr class="intesta"> <td width="15%" align="center"> Destinatario </td> <td width="15%" align="center"> Bollettino </td> <td width="14%" align="center"> Pagine </td> <td width="14%" align="center"> Stato </td> <td width="14%" align="center"> Tentativi </td> <td width="14%" align="center"> Invia </td> <td width="14%" align="center"> Elimina </td> </tr> <% For i = 1 To n Set objFaxOutgoingJob = objFaxOutgoingQueue.GetJobs.Item(i) %> <tr > <td width="15%" align="center" class="testolista"> </td> <td width="15%" align="center" class="testolista"><%=objFaxOutgoingJob.DocumentName%> </td> <td width="14%" align="center" class="testolista"><%=objFaxOutgoingJob.Pages %> </td> <td width="14%" align="center" class="testolista"><%=statofaxx(objFaxOutgoingJob.ExtendedStatusCode)%> </td> <td width="14%" align="center" class="testolista"><%=objFaxOutgoingJob.Retries%> </td> <td width="14%" align="center" class="testolista"><a href="javascript:f_confinvi('procedure/pr_invifaxx.asp?vc_numefaxx=<%=objFaxOutgoingJob.Id%>')"> [img]fax.gif[/img]</a> </td> <td width="14%" align="center" class="testolista"><a href="javascript:f_deleinvi('procedure/pr_delefaxx.asp?vc_numefaxx=<%=objFaxOutgoingJob.Id%>')"> [img]images/Icons/Delete.gif[/img]</a> </td> </tr> <% Next %> </table>

VVoVe:
Rispondi quotando
