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

Shift regions up for null values

edited July 2006 in General
I have a data pipeline that contains let's say 4 columns and is linked to a
subreport.
The subreport is placed inside a footer section of a report group.

The data returned by the pipeline may have a "null" value in any of the 4
columns (but not all).
For example:

col1 col2 col3 col4
---- ---- ---- ----
100 null 200 null
null 250 300 null
100 200 null 400

What I am trying to achieve is to "roll the columns up" if there is a null
value.
So that for the example above the detail section of the subreport would end
up looking like this:

col1 col2 col3 col4
---- ---- ---- ----
100 250 200 400
100 200 300 null

I have used a DBText for each column and then placed each DBText inside a
separate Region within the subreport's detail band .
I then tried various settings but so far I have not been able to make it
work the way I need. The subreport always ends up with 3 rows instead of
just 2.

Is this possible? I am using RB Enterprise 9.3 and Delphi 7.

Thank you.

Comments

  • edited July 2006
    Hi Peter,

    First be sure your group footer band has a phDynamic PrintHeight. Try using
    one region for each column, rather than each DBText and be sure the Stretch
    property is set to True. Next, in the Band.BeforePrint event perhaps, check
    the value of each DBField and toggle the visibility of the DBText components
    based on their value.

    DBText1.Visible := Report1.DataPipeline['MyField'] = null;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.