filter calculate field
Hi,
I?m developing a report, in a calculate field 'variable1' i need to add a
filter
show me values > 0 only.
I did the following calc in the event BeforeGenerate at 'Footer' of 'Group'
begin
If Variable1.Value = 0 then
Begin
DBText2.Visible := False;
DBText3.Visible := False;
DBText4.Visible := False;
DBText5.Visible := False;
Variable1.Visible := False;
End
Else
Begin
DBText2.Visible := True;
DBText3.Visible := True;
DBText4.Visible := True;
DBText5.Visible := True;
Variable1.Visible := True;
End;
end;
in this moment all fields returns blank in the line and i wish to see the
results, because there are many
spaces empty.
Thank you
Deivid Sartori
Ema Software
I?m developing a report, in a calculate field 'variable1' i need to add a
filter
show me values > 0 only.
I did the following calc in the event BeforeGenerate at 'Footer' of 'Group'
begin
If Variable1.Value = 0 then
Begin
DBText2.Visible := False;
DBText3.Visible := False;
DBText4.Visible := False;
DBText5.Visible := False;
Variable1.Visible := False;
End
Else
Begin
DBText2.Visible := True;
DBText3.Visible := True;
DBText4.Visible := True;
DBText5.Visible := True;
Variable1.Visible := True;
End;
end;
in this moment all fields returns blank in the line and i wish to see the
results, because there are many
spaces empty.
Thank you
Deivid Sartori
Ema Software
This discussion has been closed.
Comments
For future reference, please use your real name when posting to these
newsgroups.
1. Instead of setting all you DBTexts visible property, you might try
adding them to a single TppRegion and toggling the visibility of that single
component.
2. If you would like to remove the space left by setting the component's
visible property to False, you will need to be sure the
DetailBand.printheight property is set to phDynamic and if you decide to use
a region, set its Stretch property to True.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Can you send to me an example?
--
Deivid Sartori
Ema Software
all the DBTexts you need.
2. Place your DBText components inside the Region.
3. Set the Region's Stretch property to True.
4. Add the following code (or similar) to the DetailBand.BeforePrint
event...
ppRegion1.Visible := Variable1.Value <> 0;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com