如何在Crystal报表命令中设置querystring [英] how to set querystring in Command of Crystal report
问题描述
hiii,
我做了一个水晶报表,在其中我将Databsename传递给querystring.所以我想将该数据库绑定到Crystal Report Command.
所以这是可能的,因为该报告会根据用户的选择显示来自多个数据库的数据.
我制作了一个Webform,并使用了Crystal Report Viewer.我将数据库名称发送到querystring中.
请帮帮我.
谢谢和问候...
Mitesh
hiii,
I make a crystal report in which i pass the Databsename into querystring. so i want to bind that database into crystal report Command.
so how it possible because the report shows the data from multiple database as per selection of user.
I make a webform and use crystal report viewer. I send the database name into querystring.
Please help me.
Thanks and Regards...
Mitesh
推荐答案
为什么不在运行时设置数据库和数据库的登录参数?
试试,像这样:
Why not set the database and the logon parameters for the database at runtime?
Try, something like:
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = "YOUR SERVER NAME";
crConnectionInfo.DatabaseName = "YOUR DATABASE NAME";
crConnectionInfo.UserID = "YOUR DATABASE USERNAME";
crConnectionInfo.Password = "YOUR DATABASE PASSWORD";
此处的详细信息: C#Crystal Reports动态登录参数 [ ^ ]
Details here: C# Crystal Reports Dynamic Logon parameters [^]
这篇关于如何在Crystal报表命令中设置querystring的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!