suppress zeros in report

G

Guest

How do I suppress fields that contain zeros in my report - In my report I have fields set up like this (the data will be numeric)
(HBdrm 1) (TCBdrm1) (MRBdrm1)
(HBdrm 2) (TCBdrm2) (MRBdrm2)
If the the data is zero I want to suppress the field so it doesn't show and supress the space it occupies.
 
F

fredg

How do I suppress fields that contain zeros in my report - In my report I have fields set up like this (the data will be numeric)
(HBdrm 1) (TCBdrm1) (MRBdrm1)
(HBdrm 2) (TCBdrm2) (MRBdrm2)
If the the data is zero I want to suppress the field so it doesn't show and supress the space it occupies.

In a number datatype field, you can set the format property of the
control to:
#;-#;
Zero's will not show.

You have 3 columns across.
Setting a control's Can Shrink property will move fields underneath up
if there is no data to print .... BUT NOT if you have more than one
control on the line. Sorry.

See Format Property + Number and Currency datatypes for more info on
various format settings.
 
L

Larry Linson

"Suppress the space it occupies"? If you mean you want squeeze the
information together horizontally, that's not possible. If there are no
other Controls on the same line, CanShrink will shrink away the line. You
can use Format to eliminate the display of data, but it'll take some work to
do what you want.

One way would be to concatenate the data and display it as one long text
string, in conjunction with a Format that specified a Null string for the
zero case... the format order is plus case, minus case, zero case, and Null
case... e.g.

Format (variablename, "#0.00;(#0.00);\")

Larry Linson
Microsoft Access MVP

BobbieJ said:
How do I suppress fields that contain zeros in my report - In my report I
have fields set up like this (the data will be numeric)
(HBdrm 1) (TCBdrm1) (MRBdrm1)
(HBdrm 2) (TCBdrm2) (MRBdrm2)
If the the data is zero I want to suppress the field so it doesn't show
and supress the space it occupies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top