![]() I keep getting a Failed to open the connection. Problem: I can't seem to figure out what I can change in my ConnectionInfo to be able to make it use an ODBC connection successfully. Parameter.Name = state: This works when the report is set up to connect to the database direct, but about half of them are set up to use an ODBC connection.Īttempt: I attempted to switch the server name to the name of the ODBC connection, but this still came back with the same Failed to open the connection. ![]() ParameterDiscreteValue parameterValue = new ParameterDiscreteValue() ![]() ParameterField parameter = new ParameterField() Report.SetDatabaseLogon("user", "pass", "server", "database") įoreach ( CrTable in ) TableLogOnInfo crtableLogoninfo = new TableLogOnInfo() įoreach ( CrTable in CrTables)ĬrtableLogoninfo.ConnectionInfo = connectionInfo ĬrTable.ApplyLogOnInfo(crtableLogoninfo) Ĭ(crtableLogoninfo) įoreach (ReportDocument report in crystalReport.Subreports) String reportName = Request.QueryString ĬrystalReport = new connectionInfo = new ConnectionInfo() ĬonnectionInfo.DatabaseName = "database" ĬonnectionInfo.IntegratedSecurity = false ĬrystalReport.SetDatabaseLogon("user", "pass", "server", "database") Here's the code for loading the report: () I have a current set of code working to load a Crystal Report in c# with a server connection. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |