Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Groups not working properly

edited May 2002 in General
I'm working on a report where I have 3 different groups that are shown
depending on user selections, only one group at a time is visible. The
problem is that the group breaks are not corresponding to the breakname
variable value. I'm setting all groupHeader bands to 'Visible := False' and
all groups 'NewPage := False' in design mode and then set them to 'True' for
the group the user choose.
Trying to find a work-around using manually breaks (BreakType btCustom)
failed too since the groups are still breaking in the same way as with
BreakType btDataField.

Any ideas anybody?

I'm using Delphi 5 with all updates,
ReportBuilder 6.03 standard ,
Windows Y2K


Thanks,
Lars.

Comments

  • edited May 2002
    How are you setting up breaking conditions for the groups? Please see the
    demo below for an example of breaking group on a variable value.

    http://www.digital-metaphors.com/tips/GroupBreakOnVariable.zip

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    Thanks for the demo Alexander, I will check it out.

    However, I would prefer to have the groups break as expected when the value
    of the connected database field change. I'm still clueless about the way
    these groups are breaking, I've checked the tables several times without
    finding anything that should trigger a break.

    Thanks,
    Lars.


    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited May 2002
    Groups that are set to break on a data field break every time that data in
    the field changes. How is the data in the field value of the table on which
    you have the group set organized? One possibility is that the data might
    need to be sorted in the query, so as to group it by identical values, to
    avoid multiple group breaks among unsorted data.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    Well, thats pretty obvious that the query should be sorted on the same field
    as the field thats trigger the group breaks, and it is.
    Even when I'm generating a query where the sort field value is the same for
    the whole result set these group breaks still happens (and in this case
    there is just one group)

    Any more ideas?


    Thanks,
    Lars.


    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited May 2002
    You have to code the OnGetText event handler of the variable and not the
    OnCalc event to set the group break value.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited May 2002
    Ok, but thats still handling the breaks manually, isn't it? If thats the
    only possibility I'll go that way, but I'm not really happy with it.

    Thanks
    Lars.

  • edited May 2002
    Can you send us a simple working example project in which the groups do not
    break correctly- we would like to fix it if it is a problem. Please send it
    to support@digital-metaphors.com

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited May 2002
    When I deleted all groups exept one and, instead of setting visible/not
    visible to activate different groups, manually changed the break conditions
    for the group to whatever recordfield that group should break on, it worked!
    Seem to me that there are some bugs in ReportBuilder regarding groups.

    Thanks,
    Lars.


  • edited May 2002
    Ok, will do.

    Lars.

This discussion has been closed.