Crystal报表的登录问题 [英] Logon Issues with Crystal reports

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

问题描述

请帮助,

我正在创建一个简单的Crystal报表,该报表可查看我们呼叫中心的未完成日志.

我有一个存储过程,可以检索我需要的所有信息.
这是有趣的地方.该报告检索了所有相关数据,并向我显示了第一页.当我尝试查看第二页时,出现以下您请求的报告需要更多信息" .

然后,它请求登录凭据,当我尝试转到报告的最后一页时,出现以下错误无法连接:错误的登录参数."

使用Crystal Viewer,我可以查看我的报告.当我用10天的时间进行测试时,它大约有50个左右的页面.

我已经在Google上搜索过,但所有建议的解决方案似乎都没有用.

我使用以下软件:SQL Server 2005 Express Edition; SQL Server 2005 Express Edition. VS2008; Crystal报告版本10.5.

这是我使用的代码.
我的连接字符串如下所示:
我使用Windows身份验证登录.
提前谢谢.

Please Help,

I am creating a Simple Crystal report that views outstanding logs for our call centre.

I have a stored procedure that retrieves all the Info I need.
Here is where it gets interesting. The Report retrives all the relevant data and shows me page One. When I try to view the second page I get the following "The report you requested requires further information" .

It then requests Logon Credentials and when I attempt to go to the last Page of the Report I get the following Error "Unable to connect: incorrect log on parameters."

Using Crystal Viewer I can view my Report; it has about 50 or so pages when I test with 10 days.

I have googled but none of the suggested solutions seem to work.

I use the following: SQL Server 2005 Express Edition; VS2008; Crystal reports Version 10.5.

Heres the code I use.
My Connection String looks like this:
I use windows authentication to logon.
Thanks in advance.

Data Source=ServerName\SQLEXPRESS;Initial Catalog=DBNAME;Integrated Security=True;
try
{
  CrystalReport1 myRpt = new CrystalReport1();
  CrystalReportViewer1.DisplayGroupTree = false;
  CrystalReportViewer1.DisplayToolbar = true;
  string myConstr = ConfigurationManager.AppSettings["ConnectionString"];
  SqlConnection myConnection = new SqlConnection(myConstr);
  SqlDataAdapter myAdapter = new SqlDataAdapter();
  DataSet1 myDataSet = new DataSet1();
  SqlCommand MyCommand = myConnection.CreateCommand();
  MyCommand.CommandText = "procName";
  MyCommand.CommandType = CommandType.StoredProcedure;
  myAdapter.SelectCommand = MyCommand;
  myAdapter.SelectCommand.Parameters.Add(new SqlParameter("@myPara",Convert.ToInt32(txtDays.Text)));
  myAdapter.Fill(myDataSet, "procName");
  CrystalReportViewer1.ReportSource = myRpt;
  CrystalReportViewer1.DataBind();
}
catch (Exception ex)
{
  string strEX;
  Page.ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('Enter Day Criteria Please!!!');", true);               
}

推荐答案

您需要在运行时为Crystal报表应用登录,就像您已经为SQL Server申请过一样.仅此而已,下面的文章将为您提供帮助.

使用具有.NET的Crystal Reports对数据库登录错误进行故障排除 [ ^ ]
You need to apply login for Crystal report at run time like you have applied for SQL server. That''s all, following article will help you.

Troubleshooting Database Login Errors using Crystal Reports with .NET[^]


这篇关于Crystal报表的登录问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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