vs2008中报告的动态连接字符串 [英] dynamic connection string for reports in vs2008
问题描述
我有一个使用VS2008构建的应用程序.应用程序的连接字符串在运行时声明(采用主机名并将其赋予连接字符串).我已经使用xsd文件在报表中创建和使用数据集.
该应用程序在本地计算机上运行良好,但是当我发布代码并将其安装在其他计算机上时,只有报表无法正常工作.
有什么方法可以动态声明数据集的连接字符串?或者,也许也可以使用在此之前生成的连接字符串?
我很困惑.
请帮忙!
I have an application built using VS2008. The connection string for the app is declared at runtime (hostname is taken and given to the connection string). I have used an xsd file to create and use DataSets in my reports.
The application is running fine on my local machine, but when I publish the code, and install on some other machine, only the reports are not working.
Is there any way I can declare the connection string for the dataset dynamically? Or, maybe use the connection string generated earlier here also?
I am confused.
Please help!
推荐答案
据我了解,您对连接字符串有疑问? 您可以将类的构造函数中的DateSet传递给Crystal Report,然后将旧的DataSet设置为在Constructor中传递的数据集.
:)
As i understand your have problem with connexion string??
you can pass a DateSet in the constructor of the class to the Crystal Report and then Set the old DataSet to your Dataset passed in Constructor.
:)
这篇关于vs2008中报告的动态连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!