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

Question about groups on a report

edited August 2003 in General
Hi,

on a report i have only one group which is based on the contents of a custom
field. I calculate the value of this field (which is a TppLabel) in the
OnTraversal event of the data pipeline. The problem is that the group
doesn't break even if the value of the field changes. I also tried to use a
TppVaraible (having the CalculateOn set to Traversal), but it didn't help.

Btw, i try to make groups based on values of four database fields (so the
content of the field which should be used for group brake simply consists of
values of those four fields converted and concatenated to one string).

Any suggestion on why groups don't break? Any better solution than using a
custom field?


I use Delphi 5 and Report Builder 6.03.

Thanx for any suggestions

Comments

  • edited August 2003
    Hi,

    When grouping on a TppVarible you will need to make your calculations in the
    OnGetText event so the group will be able to know when the variable's value
    has changed. This however could cause problems as the OnGetText event fires
    multiple times per record during generation. Another alternative would be
    to change your dataset so that the calculated field is included and group on
    that value.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003


    on

    Since i don't want to add a calculated field in my data module's query (from
    where i get the data for the report), because then it would be displayed
    also in DBGrids across some forms, i thought to add such a field in the
    report's data pipeline. The problem is that i don't know how to define the
    content of the field. I rigth-clicked on the pipeline icon, choose field
    editor, then clicked on "Add" and a new field was added. But now, how do i
    set its content so that it would hold data (converted to string) from other
    four fields?

    Is this approach correct, or should i create a calculated field in the data
    module (in the query)?

    Thanx
  • edited August 2003
    The easiest way would be to use DADE and create a calculated field in a
    dataview. Otherwise you would need to use a JITPipeline conected to a
    string list with the calculated fields already in it. Try creating a
    calculated field in DADE first and see if that works for you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    Hi,

    i solved the problem by adding a calculated field to a dataset and setting
    its visibility to false (i didn't know that it is possible to hide it from
    being displayed in a dbgrid doing so). Then i encountered another problem,
    but maybe it's better if i post it as a new message.

    Thanx for the help
This discussion has been closed.