Pour imprimer un état crystal report (se remplissant à partir d'une base de données sql server) à partir de vb j'utilise cette procédure et le composant CRVIEWER :
Mais j'ai un gros problème, le composant Crystal report Viewer me renvoie une erreur : Logon failed Details ADO error Code 0x80040e4d Source : Microsoft OLE DB... for sql server Description : login failed for user 'sa' SQL State 42000
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 Public Sub editer(ByVal nomChemin As String, ByVal unForm As Form, ByVal uneTable As String, ByVal interv As Boolean) Dim rptReport As New CRAXDRT.Report Dim rptRepApp As New CRAXDRT.Application Dim rtpViews As CRAXDRT.DatabaseTable Dim rstControle As New ADODB.Recordset rstControle.Open "select * from ED_CONTROLE", gConserver If rstControle("CONTROLE") = 1 Then Set rptRepApp = New CRAXDRT.Application Set rptReport = New CRAXDRT.Report With unForm.apercu Set rptReport = rptRepApp.OpenReport(App.Path & "\Etats\" & nomChemin, 1) .ReportSource = rptReport .ViewReport End With rptReport.Database.AddOLEDBSource sChaineConnexion, uneTable If interv = True Then rptReport.Database.AddOLEDBSource sChaineConnexion, "ED_INTERVENANT" End If unForm.Top = 0 unForm.Left = 0 unForm.Width = Screen.Width - 850 unForm.Height = Screen.Height - 1200 unForm.apercu.Top = 0 unForm.apercu.Left = 0 unForm.apercu.Width = unForm.Width unForm.apercu.Height = unForm.Height unForm.apercu.EnableGroupTree = False rptReport.DiscardSavedData End If End Sub
Netive Error : 18456, mais je ne vois vraiment d'ou vien le soucis. Si quelqu'un a une idée ou peut m'aider je lui serait grandement reconnaissant.
Merci d'avance








Répondre avec citation



Partager