Crystal Reports使用VS 2010连接到多台服务器 [英] Crystal Reports connect to several servers using VS 2010

查看:73
本文介绍了Crystal Reports使用VS 2010连接到多台服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

检查此情况



多个SQL Server包含相同的数据库(不必具有相同的名称,但当然也具有相同的结构)

希望有一个Winform应用程序(使用VS2010

C#

创建)能够从上述数据库中生成报告(使用Crystal Reports).

每次启动该应用程序时,都应询问用户哪个服务器使用,数据库名称,用户名和密码.基于此信息,将执行报告.

问题:如何将这些参数传递到解决方案中的.rpt文件中,以完成上述任务?我的意思是,以编程方式使用C#

谢谢.

Check this scenario



Several SQL-Servers contains the same DB(not necessary with the same name but of course the same structure)

It is desirable to have a winform application(created using VS2010

C#

) capable to make reports (using Crystal Reports) from the DB mentioned above.

Every time the app is launched should ask to the user which Server Use, name of DB, username and password. Based on this information, the report is executed.

Question: How those parameter are passed to the .rpt files inside the solution in order to accomplish the mentioned above? I mean, programatically using C#

Thank you.

推荐答案

您可以在Crystal报表中使用push或pull方法进行此操作.来啦

更改数据库的最佳做法,网址为运行时 [ ^ ]
点击查看此演示文稿按钮(用于pdf文档).

但我建议使用拉方法.
You can do that using push or pull method in crystal reports. Here you go.

Best Practices for Changing Database at Runtime[^]
Click View this Presentation button(for the pdf document).

But I recommend pull method.


这篇关于Crystal Reports使用VS 2010连接到多台服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆