如何在Crystal报表中显示其他表的字段? [英] How to display fields of other tables in crystal reports??

查看:87
本文介绍了如何在Crystal报表中显示其他表的字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有2个表,audit_month和dept.在audit_month中,我们将dept_no作为外键.当显示报告时,我们希望从报告中的dept表获得一个dept_name.

We have 2 tables, audit_month and dept. We take dept_no as foreign key in audit_month. When we display report we want a dept_name from dept table in report. How do we do this?

推荐答案

编辑Crystal Report时,请转到数据库专家.确保选择两个表以在报告中使用.然后单击链接"选项卡.在那里,您可以将dept_no从审计表中拖放到dept表中的dept_no上方.这应该在它们之间创建一个链接.现在,您可以将dept_name放入报表中,如果设置正确,Crystal会为您处理连接.
When editing your Crystal Report, go to the Database Expert. Make sure both tables are selected to be used inside the report. Then click on the Links tab. There you can drag your dept_no from the audit table and drop it over the dept_no in the dept table. This should create a link between them. Now you can put the dept_name in your report and if you''ve set it up correctly Crystal should handle the joining for you.


这篇关于如何在Crystal报表中显示其他表的字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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