水晶报表中的两个表格... [英] two table in crystal reports...

查看:59
本文介绍了水晶报表中的两个表格...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有两个桌子
表中的数据

表格名称收入
srno名称amt
1销量1000
2销售2000
3销售3000

表名称Expence
srno名称amt
1薪水1234
2租金2067


我希望这两个表数据都在Crystal报表中.
当我在Crystal报表中选择两个表时,它仅显示两个记录.
第一个表中有三个记录,第二个表中有两个记录.
我希望将两个表中的所有数据合并到一个Crystal报告中.

它显示....

srno名称amt srno名称amt
1销售1000 1薪水1234
2销售2000 2租金2067


我想要...

srno名称amt srno名称amt
1销售1000 1薪水1234
2销售2000 2租金2067
3销售量3000





谢谢,

hi all,

i have two tables
data in table

table name Income
srno name amt
1 sales 1000
2 sales 2000
3 sales 3000

table name Expence
srno name amt
1 salary 1234
2 rent 2067


i want these both table data in crystal reports.
when i select two tables in crystal reports then it displays only two record.
there is three records in first table and two records in second.
i want all data from both table in one crystal reports.

it displays....

srno name amt srno name amt
1 sales 1000 1 salary 1234
2 sales 2000 2 rent 2067


i want .....

srno name amt srno name amt
1 sales 1000 1 salary 1234
2 sales 2000 2 rent 2067
3 sales 3000





thanks,

推荐答案

http://vb.net-informations.com/crystal-report/vb.net_crystal_report_from_multiple_tables.htm [ ^ ]

按照此链接.....:)
http://vb.net-informations.com/crystal-report/vb.net_crystal_report_from_multiple_tables.htm[^]

Follow this link.....:)


默认情况下,联接是作为内部联接完成的,这意味着您将仅在每个表中都有匹配记录的地方获得结果.

创建一个使用收入和费用之间的左联接的视图,如下所示:

By default, joins are done as inner joins, which means you will only get results where there are matching records in each table.

Create yourself a view that uses a left join between Income and Expence, like this:

select LIST_OF_FIELDS
from Income
left join Expence on Income.srno = Expence.srno



旁注-费用拼写为S.



Side note - Expense is spelled with an S.


这篇关于水晶报表中的两个表格...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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