在Crystal Report中传递连接字符串变量,而不是在Crystal Report.SetDatabaseLogon()中传递整个连接字符串

时间:2013-05-27 06:59:11

标签: crystal-reports

我想传递连接字符串变量以与Crystal Report建立连接,而不是在CrystalReport.SetDatabaseLogon中传递整个连接字符串(“username”,“password”)。

实施例: //我想做这样的事情

string con;
CrystalReport.SetDatabaseLogon(con);

//我不想传递像

这样的字符串
CrystalReport.SetDatabaseLogon("username","password").

请帮助。

谢谢, 拉胡

1 个答案:

答案 0 :(得分:0)

ReportDocument doc = new ReportDocument();    
doc.SetDatabaseLogon(AppConfig.ReportServerDSUserName, AppConfig.ReportServerDSPassword, AppConfig.ReportServerDomain, "TexERP", false);

您可以像这样传递SetDatbaseLogon的值。 您必须将值存储在AppConfig

相关问题