急,在线等待!高分请教水晶报表数据库的更换问题

chater 2003-11-13 05:56:55
我们用水晶报表连接一个SQLSERVER库,完成后,客户那边需要连接其它库,库名也不一样,需要替换,但里面的表和视图都一样的。我们的报表里有几十个子报表,每个子报表里也包含好几个字段或函数,更换时,难道要每个子报表,每个问题,每一个字段都需要更换吗?有没有一在哪里更换一下库名,里面的字段都更换过来的地方,请教!
...全文
221 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
aqinag 2004-03-07
  • 打赏
  • 举报
回复
哈哈,我得比你复杂

是从sql 转 换到mdb库
chater 2004-03-03
  • 打赏
  • 举报
回复
To: aqinag(刘志强)
我的帖子,结果你把问题解决了,真有你的。
谁楼主啊?
supergirlly 2004-03-03
  • 打赏
  • 举报
回复
不过,主报表看不到子报表的数据源,可能还要用这样的笨办法了。:)
RippleYong 2004-03-03
  • 打赏
  • 举报
回复
和我联系.
10982610
supergirlly 2004-03-03
  • 打赏
  • 举报
回复
Database-->Show SQL Query,你就可以看到所有的库连接,把他们考出来,在word下全程替换,这是最人性化的方法了,呵呵……
changyu992 2004-03-03
  • 打赏
  • 举报
回复
和我联系.
changyu992@hotmail.com
chater 2004-03-03
  • 打赏
  • 举报
回复
快啊,我要结帖啦。
aqinag 2004-02-04
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2701/2701192.xml?temp=.6722223

程序中可以把动态设置的水晶报表数据源保存下来吗?
aqinag 2004-02-04
  • 打赏
  • 举报
回复
是从access数据源转为sql server数据源
aqinag 2004-02-04
  • 打赏
  • 举报
回复
原来是想在vc中做报表的,但在 vc一直没办法更改数据源,所以我想用vb做一个dll,更改好数据淅,vc中直接调用改好的报表

zcwhgj 2004-02-04
  • 打赏
  • 举报
回复
不同的数据源保存的方式不同的,如果你用的是代码连接的,哪么你把这一块代码模块化,保存这一段代码不就是保存了数据源,有一些数据源是保存在数据源文件的,哪么保存文件就保存了数据源。关键是你把数据源这一块独立的化分出来,不论什么方式都好保存啊?以后转换也会方便一些。
aqinag 2004-02-04
  • 打赏
  • 举报
回复
上面的问题解决了

想问一下

如何保存设置好的数据源?
zcwhgj 2004-02-01
  • 打赏
  • 举报
回复
crdb_ado.dll指定路径吧。
aqinag 2004-01-30
  • 打赏
  • 举报
回复
下面是改变为不同的数据源,从access->sql server
这个是水晶报表中的一个例子,在devloper help 中有,在调试中,出现
"could not load crdb_ado.dll"的错误

' Declare a ConnectionProperties collection.
Dim CPProperties As CRAXDRT.ConnectionProperties
' Declare a DatabaseTable object.
Dim DBTable As CRAXDRT.DatabaseTable

' Get the first table in the report.
Set DBTable = Report.Database.Tables(1)

' Get the collection of connection properties.
Set CPProperties = DBTable.ConnectionProperties

' Change the database DLL used by the report from
' native Access (crdb_dao.dll) to ADO/OLEDB (crdb_ado.dll).
DBTable.DllName = "crdb_ado.dll"

' The connection property bags contain the name and value
' pairs for the native Access DLL (crdb_dao.dll). So we need
' to clear them, and then add the name and value pairs that
' are required to connect to the OLEDB data source.

' Clear all the ConnectioProperty objects from the collection.
CPProperties.DeleteAll

' Add the name value pair for the provider.
CPProperties.Add "Provider", "SQLOLEDB"

' Add the name value pair for the data source (server).
CPProperties.Add "Data Source", "ServerA"

' Add the name value pair for the database.
CPProperties.Add "Initial Catalog", "pubs"

' Add the name value pair for the user name.
CPProperties.Add "User ID", "UserName"

' Add the name value pair for the password.
CPProperties.Add "Password", "password"

' Set the table name.
DBTable.Location = "Customer"

Screen.MousePointer = vbHourglass
' Set the report source of the viewer and view the report.
CRViewer91.ReportSource = Report
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
zcwhgj 2004-01-29
  • 打赏
  • 举报
回复
能有代码就好了。这样不是很清楚。
aqinag 2004-01-29
  • 打赏
  • 举报
回复
报表中原来用的是acces,
现在改成 sql server了

直接用SetDataSource
不行,报表还是在找原来的数据源
zcwhgj 2003-11-25
  • 打赏
  • 举报
回复
不知你原来是如何用的,你能讲一讲你原来是如何连接如何实现的吗?否则无法给你太多的帮助。
ybdeepblue 2003-11-24
  • 打赏
  • 举报
回复
让你的连接字串改变即可,你可使用一个小的注册程序让用户自己输入sever和database的名字,然后你的小的注册程序让用户输入的内容转换为连接字串的形式写到用户的注册表中,以后当数据库有变化时,只要读取用户注册标下的key值就可以了,可以动态的更改。
红牛哥110 2003-11-14
  • 打赏
  • 举报
回复
原則上可能實現,水晶報表好像有這個功能.
qiyunhui 2003-11-14
  • 打赏
  • 举报
回复
楼上说得有理。能不能给些代码。ado的。
加载更多回复(3)

809

社区成员

发帖
与我相关
我的任务
社区描述
VB 多媒体
社区管理员
  • 多媒体
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧