Shift regions up for null values
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.
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.
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com