using (SqlConnectionconn=newSqlConnection(connStr)) { conn.Open();stringSQL="select * from UserInfo";SqlDataAdaptersda=newSqlDataAdapter(SQL, conn); sda.Fill(ds,"UserInfo"); }ReportDocumentrd=newReportDocument();//获取报表路径stringreportPath=Server.MapPath("Reports/CrystalReport2.rpt"); rd.Load...
在Crystal Report关闭后断开SQL客户端连接,可以通过以下步骤实现: 1. 在Crystal Report中,确保在报表生成完成后,手动关闭数据库连接。这可以通过在报表的最后一个数据源或...
按以前方式,安装系统,SQL Server 2008,Visual Studio 2010...然后是Crystal Report 2011。可是要用CR连数据库的时候,老是出现问题。 Logon failed. Details: ADO Error Code: 0x80004005 Source: Microsoft OLE DB Provider for SQL Server Description: [DBNETLIB][ConnectionOpen(SECCreateCredentials()).] SSL Se...
for (int i = 0; i == report.Database.Tables.Count - 1; i++) { logOnInfo.ConnectionInfo.ServerName = "SQLServerName"; logOnInfo.ConnectionInfo.DatabaseName = "DBName"; logOnInfo.ConnectionInfo.UserID = "sa"; logOnInfo.ConnectionInfo.Password = "sa"; report....
''use SQL connection database 'With crConnectionInfo ' .AllowCustomConnection = True ' .ServerName = "(local)" ' .DatabaseName = "TempDB" ' .UserID = "sa" ' .Password = "Microwin" 'End With '指定报表路径 ReportPath = Server.MapPath(Request.ApplicationPath) ...
using System.Data.SqlClient; using CrystalDecisions.CrystalReports.Engine; namespace WebApplication1 { public static class ClassDB { public static List<test> Reporting() { var results = new List<test>(); using (SqlConnection _con = new SqlConnection("server=TestReporting.mssql.somee.com;dat...
with logonInfo.connectioninfo .serverName= "Localhost" .Databasename= "pubs" .UserID= "sa" .Password="" End With table.applyLogonInfo(logonInfo) next table Crviewer.reportsource= reportDoc 2、如果是多个相关的表作为报表的数据源,最好使用存储过程或者查询作为数据源。
我使用下面的方法,它驻留在一个类中,在运行时将登录信息加载到crystal reports (VB.Net,SQL Server...
使用Rational Application Developer 数据库工具建立与后端数据库之间的连接。如步骤 2 所示,设计 Crystal Report。 在Rational Application Developer 工作空间中,转换到 Data 视图(Window > Open Perspective > Data)。 在Database Explorer 视图中右键单击,然后选择 New Connection。
六、Crystal Report的具体实例 本部分的例子分成两部分:Windows应用程序中的Crystal Report开发;Web应用程序中的Crystal Report开发应用。并且在两种环境下分别介绍拉模型与推模型的例子。 在本部分例子中使用的软件环境:Microsoft Visual Studio 2005;Microsoft SQL Server 2005。数据例子如下:服务器:cotton-b数据库名:l...