我正在使用水晶报表查看器工具制作水晶报表 [英] I am doing crystal report using the tool crystal report viewer

查看:76
本文介绍了我正在使用水晶报表查看器工具制作水晶报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遵循的代码(按钮单击下面的代码)

COde as Follows(Button click Code as Below)

con = new SqlConnection("Server=(local);initial catalog=ServiceTax;Trusted_Connection=True");
            con.Open();
            string str = "select * from RSBills where Billno =  '" + cb_billno.SelectedItem + "'";
            SqlCommand com = new SqlCommand(str, con);
            SqlDataAdapter sqlda = new SqlDataAdapter(com);
            DataSet ds = new DataSet();
            sqlda.Fill(ds, "RSBills");
            con.Close();

            ReportDocument r1 = new ReportDocument();
            r1.Load("Reports/RSReprot.rpt");
            r1.SetDataSource(ds);
           crystalReportViewer1.ReportSource = r1;
           crystalReportViewer1.RefreshReport();





Select * from RSBills (in Database)

RS009	5:10:12 MTEL/RRD  231270 19767	0 30124	 602   301
RS010   5:10:12 KRypton    4500   392   0  587    12    6
Rs011   5:10:12 PMSL       3000   197   0 102687  2054 1027



在设计页面中,我使用了文本框和一个按钮.

在文本框中,当我键入Billno(RS009)并单击按钮时,我希望输出为
RS009 5:10:12 MTEL/RRD 231270 19767 0 30124 602301

类似地,当我键入Billno(Rs010)并单击按钮时,我希望输出为
RS010 5:10:12 Krypton 4500 392 0 587 12 6

当我运行报告Error As Follows;

加载报告失败.



in design page i have using textbox and one button.

in textbox when i type the Billno(RS009) and click the button i want the output as
RS009 5:10:12 MTEL/RRD 231270 19767 0 30124 602 301

Simliarly when i type the Billno(Rs010) and click the button i want the output as
RS010 5:10:12 KRypton 4500 392 0 587 12 6

When i run the report Error As Follows;

Load Report Failed.

推荐答案

Chk通过以下链接...

http://msdn.microsoft.com/zh-CN/library/ms227881.aspx

使用其功能组逐步创建Crystal Report,图形,交叉表和子报表 [ ..
Chk on the following links...

http://msdn.microsoft.com/en-us/library/ms227881.aspx

Step by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report[..


这篇关于我正在使用水晶报表查看器工具制作水晶报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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