Crystall报告错误 [英] Crystall report Error

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

问题描述

我有2张桌子

 1)tm_Customer(custId,CName,address,contactNo)
2)tm_booking(bID,Amount,CustID)



表中的数据

1)tm_customer

 1,jagdish,asdf, 122334 
2,ghi,qwert,34455
3,jkl,asdfgh,34521
4,iuy,lkjff,3434



2 )tm_booking

 1,12000,1 
2,123000,2
3,2345,3
4,1234,1
5,123,4



我执行的查询如下:

 选择 bid,cName,address,contactno,amount 来自 tm_booking b,tm_customer c 其中 b.custID = c.custId  bid = 2; 



所以结果应该是是

 2,ghi,qwert,34455,12300 



我在Datatable中得到这个结果但是当我正在将这个数据分配给crystall报告。它向我显示如下:

 2,Jagdish,asdf,122334,12300 
2,ghi,qwert,34455,12300
2, jkl,asdfgh,34521,12300
2,iuy,lkjff,3434,12300



错误是分配给所有客户表记录的预订表的单一记录水晶报告。



可以任何人建议我解决方案???

提前完成。

解决方案

您的查询不正确。尝试:

 选择 a.bid,a.cName,a.address,a.contactno,b .amount 来自 tm_customer a  INNER   JOIN  tm_booking b  ON  a.custID = b.custId 



添加其中子句根据需要。


您的查询不正确。



尝试:

 选择 a .bid,a.cName,a.address,a.contactno,b.amount 来自 tm_customer a  INNER   JOIN  tm_booking b  ON  a.custID = b.custId 



根据需要添加 where 子句。


Thanx for help bt我自己解决了它.. ..

I have 2 tables

1) tm_Customer(custId,CName,address,contactNo)
2) tm_booking(bID,Amount,CustID)


data in table
1) tm_customer

1, jagdish,asdf,122334
2, ghi,    qwert,34455
3, jkl,    asdfgh,34521
4, iuy,    lkjff,3434


2) tm_booking

1, 12000,  1
2, 123000, 2
3, 2345,   3
4, 1234,   1
5, 123,    4


I am executing query as following:

select bid,cName,address,contactno,amount from tm_booking b,tm_customer c where b.custID=c.custId and bid=2;


so result should be

2 ,ghi, qwert, 34455, 12300


I am getting this result in Datatable but when i am assigning this datatable to crystall report. It shows me like this:

2 ,Jagdish, asdf, 122334, 12300
2 ,ghi, qwert, 34455, 12300
2 ,jkl, asdfgh, 34521, 12300
2 ,iuy, lkjff, 3434, 12300


error is single record of booking table assigned to all record of customer table in crystal report.

can any one suggest me solution???
Thanx in advance.

解决方案

Your query is incorrect. Try:

select a.bid, a.cName, a.address, a.contactno, b.amount from tm_customer a INNER JOIN tm_booking b ON a.custID=b.custId


Add where clause as per need.


Your query is incorrect.

Try:

select a.bid, a.cName, a.address, a.contactno, b.amount from tm_customer a INNER JOIN tm_booking b ON a.custID=b.custId


Add where clause to it as per need.


Thanx for the help bt i had solve it my self....


这篇关于Crystall报告错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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