DataBase Vender代码17 [英] DataBase Vender code 17
本文介绍了DataBase Vender代码17的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi
i在win应用程序的客户端有问题,当运行app并想在水晶报表页面打印dataBase供应商代码:17,请帮我解决问题。
dataBase
表1:salefact db
表2:buyerdb
view1:总付款,总和购买
源代码:
hi
i have a problem in client side in win application,when run app and want to print in crystal report page the dataBase Vendor code:17,please help me to solve the problem.
dataBase
Table 1: salefact db
Table 2: buyerdb
view1 : sum payment, sum buying
source code:
ReportDocument rd = new ReportDocument();
Fid = int.Parse(txtFact.Text);
conn.Open();
cmd = conn.CreateCommand();
cmd.CommandText = "SELECT BuyerDB.buyer_id, BuyerDB.buyer_name, BuyerDB.buyer_family, BuyerDB.buyer_add, BuyerDB.buyer_mobile, BuyerDB.buyer_phone, SaleFactDB.fact_id, " +
" SaleFactDB.buyer_id AS Expr1, SaleFactDB.date, SaleFactDB.time, SaleFactDB.row, SaleFactDB.disb, SaleFactDB.ayar, SaleFactDB.weight, SaleFactDB.fee, " +
" SaleFactDB.afzude, SaleFactDB.tala_price, SaleFactDB.total_row, SaleFactDB.state, View_1.buyer_id AS Expr2, View_1.payment, View_1.buying " +
"FROM BuyerDB INNER JOIN SaleFactDB ON BuyerDB.buyer_id = SaleFactDB.buyer_id INNER JOIN" +
" View_1 ON BuyerDB.buyer_id = View_1.buyer_id WHERE SaleFactDB.fact_id = " + Fid;
adap = new SqlDataAdapter();
adap.SelectCommand = cmd;
DataTable custDB = new DataTable();
adap.Fill(custDB);
conn.Close();
PrintFactor myReport = new PrintFactor();
myReport.SetDatabaseLogon("sa", "12");
myReport.SetDataSource(custDB);
crystalReportViewer1.ReportSource = myReport;
推荐答案
检查以下链接
http://forums.asp.net/t/997655.aspx [ ^ ]
这篇关于DataBase Vender代码17的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文