En faite pour eviter le msg d erreur logOnfailed il faut parcourir les tables en mettant un code dans le load de la page, mais meme apres ca ca ne marche pas il me met a nouveau le message d erreur
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Dim oRpt As New ReportDocument
oRpt.Load("C:\Inetpub\wwwroot\WebApplication3\CrystalReport4.rpt")
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
For Each tbCurrent In oRpt.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = "SERVEURDEV"
.UserID = "sa"
.Password = "pass"
.DatabaseName = "bd"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent
Me.CrystalReportViewer1.ReportSource = oRpt
oRpt.ExportToDisk(ExportFormatType.PortableDocFormat, "c:\test.pdf") |
Détails de l'exception: CrystalDecisions.CrystalReports.Engine.LogOnException: Échec de la connexion.
J'ai jamais de réponse de la part d un membre du forum sur l export de crystal report sous un doc office, ce n'est pas possible que personne n'ait jamais fait ca ...
Merci de toute votre attention
Partager