多表报告晶体报告未显示数据 [英] Multiple table report crystal report not showing data

查看:67
本文介绍了多表报告晶体报告未显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在我的水晶报告中,我在我的数据集中添加了4个表格。我的数据库有3个不同的列来保存所有交易的购买详情。这3个列是现金,支票和信用。例如,如果用户购买现金项目,那么金额将转到现金列。用户甚至可以使用上述3种方法进行支付。以下是我的代码





Hi guys,

In my crystal report i have added 4 tables to my dataset. My database has 3 different columns to keep the purchase details of all the transactions.Those 3 columns are Cash,Cheques and Credit.For an example if user buys an item for Cash that amount will go to Cash column. Also user can even do their payments using above 3 methods as well. Below is my code


DataSetCashierReceiptsResi dsReceiptsResi = new DataSetCashierReceiptsResi();
     DataTable dtReceiptsResi = new DataTable();

     dtReceiptsResi.Columns.Add("TransNo", typeof(string));
     dtReceiptsResi.Columns.Add("CustomerName", typeof(string));
     dtReceiptsResi.Columns.Add("Description", typeof(string));
     dtReceiptsResi.Columns.Add("Amount", typeof(decimal));
     dtReceiptsResi.Columns.Add("BalDue", typeof(decimal));
     dtReceiptsResi.Columns.Add("Salesman", typeof(string));

     DataTable dtReceiptsResi_CASH = new DataTable();

     dtReceiptsResi_CASH.Columns.Add("TransNo", typeof(string));
     dtReceiptsResi_CASH.Columns.Add("CashData", typeof(string));
     dtReceiptsResi_CASH.Columns.Add("CashAmount", typeof(decimal));










#region CASHIER PRINT RECEIPTS RESI
               dtReceiptsResi = print.CashierPrintReceiptsResi(); // BIND CREDIT INVOICES RESIDENTIAL
               dsReceiptsResi.Tables["DataTable1"].Merge(dtReceiptsResi);

               MessageBox.Show(dsReceiptsResi.Tables["DataTable1"].Rows.Count.ToString());

               rptDoc.Subreports[4].SetDataSource(dtReceiptsResi);
               rptDoc.Subreports[4].DataSourceConnections.Clear();

               #endregion

               #region CASHIER PRINT RECEIPTS RESI CASH ONLY

               dtReceiptsResi = print.CashierPrintReceiptsResiCashOnly(); // BIND CREDIT INVOICES RESIDENTIAL

               dsReceiptsResi.Tables[dsReceiptsResi.DataTable11.TableName].Merge(dtReceiptsResi);

               MessageBox.Show(dsReceiptsResi.Tables["DataTable11"].Rows.Count.ToString());

               DataView ddd = new DataView(dsReceiptsResi.Tables["DataTable11"]);
               for (int k = 0; k < 4; k++)
               {
                   MessageBox.Show(ddd[k]["TransNo"].ToString() + " %%% " + ddd[k]["CashData"].ToString() + " %%% " + ddd[k]["CashAmount"].ToString() + " %%% ");

               }
               rptDoc.Subreports[4].SetDataSource(dsReceiptsResi.Tables["DataTable11"]);
               rptDoc.Subreports[4].DataSourceConnections.Clear();


               #endregion







Iam在msg框中检查数据是否已到达。数据成功收到数据表,但它不会显示在水晶报告中。需要帮助的人..我希望我的问题很清楚: - )




Iam checking in msg box whether data has arrived or not. Data is successfully received to the datatable but it wont display in the crystal report.Need help guys..i hope my question is clear :-)

推荐答案

HI,



只是解雇了水晶报告并看到天气报告显示是否有任何数据?


just fired the crystal report only and see weather report showing any data or not?


这篇关于多表报告晶体报告未显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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