on 10-16-2014 1:48 PM
Dim CrTable As Table
'Localizo o report
cryRpt.Load(".\" & Nome_do_Report)
'Faço a conexao com o servidor aonde esta os report
With crConnectionInfo
.ServerName = Conectar_relatorio(1)
.DatabaseName = Conectar_relatorio(2)
.UserID = Conectar_relatorio(3)
.Password = Conectar_relatorio(4)
End With
CrTables = cryRpt.Database.Tables
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
cryRpt.VerifyDatabase()
Dim j As Integer = 1
For i As Integer = 0 To UBound(Parametro_e_Objeto, 1)
'Quando i = 2 e j = 2, nada acontece apenas aumenta-se 2 no j que será j = 4 e i = 3
If j <> i Then
j = i + 1
cryRpt.SetParameterValue(Parametro_e_Objeto(i), Parametro_e_Objeto(j))
Else
j = i + 2
End If
Next i
Try
Dim CrExportOptions As New ExportOptions
Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions
Dim MailOpts As New MicrosoftMailDestinationOptions()
' CrDiskFileDestinationOptions.DiskFileName = Nome_ficheiro & ".pdf"
CrExportOptions = cryRpt.ExportOptions
With CrExportOptions
.ExportDestinationType = ExportDestinationType.MicrosoftMail
.ExportFormatType = ExportFormatType.PortableDocFormat
.FormatOptions = CrFormatTypeOptions
End With
With MailOpts
.MailToList = Enviar_para
'Com conhecimento
.MailCCList = Cc_para
.MailSubject = Assunto
.MailMessage = Mensagem
End With
CrExportOptions.DestinationOptions = MailOpts
cryRpt.Export()
Catch ex As Exception
guardarErro(ex, " - No procedimento de exportação do report para envio de email " & Nome_do_Report)
End Try
Catch ex As Exception
guardarErro(ex, " - Ligação com report usando parametro para envio de email")
End Try
Message was edited by: Ludek Uher Please note: English only(!). I did the best translation of the title that I could.
What is the issue? Errors? Symptoms? Behavior?
See is searching - using the search box in the top right corner will get you info that will help - it should...
Also, SP 11 was removed yesterday due to backward compatibility issues. Consider going back to SP 10.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.