How do I do this group report

I want this;

Group header 1
Details

Group header 2
Details

Group header 3
Details

Group header 4
Details


But get this;
Group header 1
Group header 2
Group header 3
Group header 4
Details

Group header 2
Group header 3
Group header 4
Details

Group header 3
Group header 4
Details

Group header 4
Details

The header criteria are
Group header 1 = x < 100
Group header 2 = x < 200
Group header 3 = x < 300
Group header 4 = x < 400

I've been stuck on this for days can anybody help?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:22PM
    You may not want a group report you may want master detail detail detail detail
    with that said, grouping relies on the data being pre sorted
    to the grouping criteria.
    ie a query across several tables returning all the data
    with an order by clause which has the fields on which the grouping criteria is ordered left to right.
    in other words each group header would be the condition of a different field.

    with that said trying on different values of the same field.
    as your example
    The header criteria are
    Group header 1 = x < 100
    Group header 2 = x < 200
    Group header 3 = x < 300
    Group header 4 = x < 400
    assumming the data is presorted to meet the above
    try
    Group header 1 = x <= 100
    Group header 2 = x > 100 and x <= 200
    Group header 3 = x > 200 and x <= 300
    Group header 4 = x > 300
    regards ;)

  • edited 4:22PM
    Thanks gordk
    wrote:
    Group header 1 = x <= 100
    Group header 2 = x > 100 and x <= 200
    Group header 3 = x > 200 and x <= 300
    Group header 4 = x > 300
    Tried that it didn't make a lot of difference.
    wrote:
    master detail detail detail detail
    I am doing this as an end user and can only create the report and one sql table, ( currently im using
    select x,y from table order by x
    
    ) so i don't think I can do it this way but I will give it a try.

  • gordkgordk St.Catherines On. Canada.
    edited 4:22PM
    hi it will work with grouping if we get the condition expression correct
    here is a sample from a test note all the extra [ ] pairs.
    just sub your queryname where needed
    groupheader2 condition

    [DialogForm.Query1."X"]<= 200] and [[DialogForm.Query1."X"]> 100

    regards ;)
  • edited 4:22PM
    Thanks for trying but it is still the same, I must have something else wrong.
  • gordkgordk St.Catherines On. Canada.
    edited 4:22PM
    Hi
    Assuming you got the condition syntax correct
    if you want header footer combinations to show like
    gh1
    data
    gf1
    gh2
    data
    gf2
    and so on
    then in each header bands obp add code
    visible := copy and paste condition.
    in groufooter obp add code
    visible := groupheader1.visible and so on for each footer band
    regards ;)
  • edited 4:22PM
    Perfect, fantastic, brilliant works like a dream. ;) ;) ;) ;) ;)

    I had tried hiding the headers but was doing it in the condition script which left a blank line for each hidden header / footer.

    Thanks again gordk the beers are most definitely on me. ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.