Can I do two levels of linking in Crystal Reports?
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 Gr开发者_如何学运维oup 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!
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
精彩评论