请求Crystal REPORT需要进一步的信息 [英] Crystal REPORT requested requires further information

查看:55
本文介绍了请求Crystal REPORT需要进一步的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在调试表单时创建一个水晶报告显示这个



报告屏幕 [ ^ ]





页面加载代码



I try to create a crystal report when i debug form it show this

report screen[^]


page load code

protected void Page_Load(object sender, EventArgs e)
       {

           //report code
           DataSet ds = new DataSet();
           Class1 myclass = new Class1();
           ds.Tables.Add(myclass.report1().Copy());
           ds.Tables[0].TableName = "spcustomers";

           CrystalReport1 report = new CrystalReport1();
           report.SetDataSource(ds);
           CrystalReportViewer1.ReportSource = report;
           CrystalReportViewer1.DataBind();}







类代码




class code

public class Class1
    {
        Database db = DatabaseFactory.CreateDatabase("NORTHWND");

        public DataTable report1()
        {
            return db.ExecuteDataSet("spcustomers").Tables[0];
        }
    }





任何帮助?如何解决这个



any help? how to solve this

推荐答案

你好,





我看到了您给出的报告屏幕截图但是它没什么,如果您可以运行应用程序,它会询问每次数据库登录凭据数据库名称,用户名和密码。我们可以轻松解决请求登录凭据。如果你可以使用下面的代码



Hi,


I saw the report screen shot above you gave but it is nothing, if you can run the application it will ask every time database login credentials database name, user name and password. we can easily solve asking login credentials. if you can use the below code

ReportDocument reportDocument= new ReportDocument();

reportDocument.Load(Server.MapPath("Reports\\CustomerReport.rpt"));

reportDocument.SetDatabaseLogon(db username, db password, db server, database name);

CrystalReportViewer1.ReportSource = reportDocument;





如果您需要任何帮助ping我



if you need any help ping me


这篇关于请求Crystal REPORT需要进一步的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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