Can I do two levels of linking in Crystal Reports?

依然范特西╮ 提交于 2019-12-11 04:57:56

问题


Let's say I have three lists: Departments, Divisions, and Groups. A Department is made up of Divisions, which in turn is made up of Groups.

The Divisions have the Department ID as a foreign key. The Groups have the Division ID as a foreign key.

I'd like to produce a report that looks like this:

Department 1
    Division 1A
        Group 1A-i
        Group 1A-ii
        Group 1A-iii
    Division 1B
        Group 1B-i
        Group 1B-ii
        Group 1B-iii
    Division 1C
        Group 1C-i
        Group 1C-ii
        Group 1C-iii
Department 2
    Division 2A
        Group 2A-i
        Group 2A-ii
        Group 2A-iii
    Division 2B
        Group 2B-i
        Group 2B-ii
        Group 2B-iii
    Division 2C
        Group 2C-i
        Group 2C-ii
        Group 2C-iii
Department 3
    Division 3A
        Group 3A-i
        Group 3A-ii
        Group 3A-iii
    Division 3B
        Group 3B-i
        Group 3B-ii
        Group 3B-iii
    Division 3C
        Group 3C-i
        Group 3C-ii
        Group 3C-iii

I know how to use a subreport in Crystal Reports (VB.NET and Visual Studio 2005) to get me to the Division level:

Department 1
    Division 1A
    Division 1B
    Division 1C
Department 2
    Division 2A
    Division 2B
    Division 2C
Department 3
    Division 3A
    Division 3B
    Division 3C

But since I can't include a subreport within a subreport, I'll need to go about it some other way. Is there a way to do this?

Thanks in advance!


回答1:


Have you tried to use groups? You can just link the tables by their foreign keys and create a group for Department, another one for Division and put the groups in the details.

Here is a tutorial



来源:https://stackoverflow.com/questions/2166963/can-i-do-two-levels-of-linking-in-crystal-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!