Hello,
when i try to use GetSQLStatement on a report I have an error message "Unable to connect incorrect logon parameters" in french :
Echec de la connexion.
Erreur dans le fichier RAPPORT-ANAL {AF7210B3-B249-4A66-84C9-837220A9C3E9}.rpt :
Connexion impossible : les paramètres de connexion sont incorrects.
and the error code is -2147217393
Environment :
- Windows 7 Professionnal SP1 64 bits (french version)
- Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel
- Microsoft .NET Framework Version 4.5.50709 SP1Rel
- I use an ODBC Text Driver and data are saved with the report
- Version of DLL's are13.0.2000.0
- Link to the DLL's : C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.ReportAppServer.Controllers.dll
- Target Framework : 4.0
- Compile Target : Any CPU
This is the VB .NET code :
Private Function getSQL2() As String
' Declarations
Dim boReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
Dim boReportClientDocument As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument
Dim boRowsetController As CrystalDecisions.ReportAppServer.Controllers.RowsetController
Dim boGroupPath As CrystalDecisions.ReportAppServer.DataDefModel.ISCRGroupPath
' Load the report from the application directory
boReportDocument.Load("D:\Crystal\Reports\RAPPORT.rpt")
boReportClientDocument = boReportDocument.ReportClientDocument
boReportOptions = boReportClientDocument.ReportOptions
boRowsetController = boReportClientDocument.RowsetController
'boRowsetController.Refresh()
boGroupPath = New CrystalDecisions.ReportAppServer.DataDefModel.GroupPath
Return (boRowsetController.GetSQLStatement(boGroupPath))
End Function
Joël.