开发者

Layout hierarchical issue in an Access report

I've been struggling the last 开发者_运维知识库hours on the following problem, I hope somebody will have an idea... This is a problem of report layout in Access.

Here is a simplification of my data model: A is the "father" of one or more B that is the father of one or more C.

What is really easy to display in the report is the following:

A
   B1
   B2
       C2.1
       C2.2
       C2.3
   B3
       C3.1

etc where B1, B2, B3 are the children of A and C2.1 etc... the children of B2.

Another easy thing to display is ONLY the grand children of A: in the report design mode, I just have to remove the reference to B (but I keep it in the query, of course, to maintain the relation between A and C), I will obtain the following:

A
       C2.1
       C2.2
       C2.3
       C3.1   

Now, what I don't manage to perform is to display for each A, at first, all his children, and then, all his grand children. In our simplification, it would mean to display the following in the same report:

A
   B1
   B2
   B3
       C2.1
       C2.2
       C2.3
       C3.1

The classical layout of my report is that A objects are in group header A, B objects in group header B and C objects in group header C. To obtain this new layout, I have tried to move my B object from the group header B to the group header A, but when I do that, it displays only:

A
   B1
       C2.1
       C2.2
       C2.3
       C3.1

How can I display ALL B's that are related to A ?

Thank you for your help...


Try this:

  1. Create a new report.
  2. Group this report by A, then B
  3. In the Report Footer, create a subreport.
  4. Group this subreport by A, then C.

This will give you:

A
   B1
   B2
   B3
A
   C2.1
   C2.2
   C2.3
   C3.1

(I'm curious, why display this hierarchy in such a non-hierarchical style? A school project?)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜