crystal report登录faile错误 [英] crystal report login faile error

查看:99
本文介绍了crystal report登录faile错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当水晶报告运行错误时我有问题

水晶报告登录失败用户名,密码

注意:

连接字符串没有用户名和密码,例如

cn = new SqlConnection(@server = localhost; database = Issues; integrated security = true;);





I have a problem when crystal report running error
crystal report login failed "username","password"
Notes :
connection string don't have username and password like
cn = new SqlConnection(@"server=localhost; database=Issues; integrated security= true;");


get_all_report myreport2 = new get_all_report();
                               
                myreport2.SetDatabaseLogon("sa", "", "localhost", "Issues", true);
                
                myreport2.SetParameterValue("@fld", "rep_number");
                myreport2.SetParameterValue("@val", textBox2.Text);
                report_view myform = new report_view();
                myform.crystalReportViewer1.ReportSource = myreport2;
                myform.ShowDialog();

推荐答案

如果连接字符串没有凭据意味着它正在访问您的Windows身份验证。所以在上面的代码中删除包含myreport2.SetDatabaseLogon的行或写下你的windows登录ID和密码而不是sa。
If you connection string is not having credentials meaning it is accessing your windows authentication. So in your above code remove line having myreport2.SetDatabaseLogon or write your windows login id and password rather than "sa".


这篇关于crystal report登录faile错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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