How to Make my report show only complete fields

  • Thread starter Thread starter DavPet
  • Start date Start date
D

DavPet

I have report that I created using the Report Wizard. It shows all of the
fields from my table, just like I want it to. When a record in my table
contains all completed data, I want all of the fields to show. Records in
my table contain completed fields AND incomplete fields, I want the report
to show only the completed fields, like this:
Record1
Field_A
Field_C
Record2
Field_C
Record3
Field_B

Right now I see blank lines where the field are incomplete.

The table contains a Yes/No box to indicate if it's related field is
complete. Those are the ones I want to see in report without blank lines
where the incompleted ones would have shown.
Any suggestions?
 
DavPet said:
I have report that I created using the Report Wizard. It shows all of the
fields from my table, just like I want it to. When a record in my table
contains all completed data, I want all of the fields to show. Records in
my table contain completed fields AND incomplete fields, I want the report
to show only the completed fields, like this:
Record1
Field_A
Field_C
Record2
Field_C
Record3
Field_B

Right now I see blank lines where the field are incomplete.

The table contains a Yes/No box to indicate if it's related field is
complete. Those are the ones I want to see in report without blank lines
where the incompleted ones would have shown.


Use an expression instead of just the field name in the text
boxes:

=IIf([yesnofieldA], [FieldA], Null)

and set both the text boxes' and the Detail section's
CanShrink property to Yes.
 
I do not have yes/no boxes but I have about 30 text fiels with labels, and
some of them are blank. How can I avoid printing labels for empty fields in
the report. I have already changed my labels to text field, Yes for
CanShrink. It worked for 2 fields, but not for others. Any easier way, please?

Marshall Barton said:
DavPet said:
I have report that I created using the Report Wizard. It shows all of the
fields from my table, just like I want it to. When a record in my table
contains all completed data, I want all of the fields to show. Records in
my table contain completed fields AND incomplete fields, I want the report
to show only the completed fields, like this:
Record1
Field_A
Field_C
Record2
Field_C
Record3
Field_B

Right now I see blank lines where the field are incomplete.

The table contains a Yes/No box to indicate if it's related field is
complete. Those are the ones I want to see in report without blank lines
where the incompleted ones would have shown.


Use an expression instead of just the field name in the text
boxes:

=IIf([yesnofieldA], [FieldA], Null)

and set both the text boxes' and the Detail section's
CanShrink property to Yes.
 
I guess I should have known there would be labels. In this
case, I recommend using VBA code like:

Me.textboxA.Visible = Not IsNull(Me.textboxA)
Me.textboxB.Visible = Not IsNull(Me.textboxB)
. . .

Make sure that the labels are attached to the text boxes.

The reason this is sufficient is that an attached label will
automatically be made invisible when it's text box is made
invisible.
--
Marsh
MVP [MS Access]

I do not have yes/no boxes but I have about 30 text fiels with labels, and
some of them are blank. How can I avoid printing labels for empty fields in
the report. I have already changed my labels to text field, Yes for
CanShrink. It worked for 2 fields, but not for others. Any easier way, please?

Marshall Barton said:
Use an expression instead of just the field name in the text
boxes:

=IIf([yesnofieldA], [FieldA], Null)

and set both the text boxes' and the Detail section's
CanShrink property to Yes.
 
thank you

Marshall Barton said:
DavPet said:
I have report that I created using the Report Wizard. It shows all of the
fields from my table, just like I want it to. When a record in my table
contains all completed data, I want all of the fields to show. Records in
my table contain completed fields AND incomplete fields, I want the report
to show only the completed fields, like this:
Record1
Field_A
Field_C
Record2
Field_C
Record3
Field_B

Right now I see blank lines where the field are incomplete.

The table contains a Yes/No box to indicate if it's related field is
complete. Those are the ones I want to see in report without blank lines
where the incompleted ones would have shown.


Use an expression instead of just the field name in the text
boxes:

=IIf([yesnofieldA], [FieldA], Null)

and set both the text boxes' and the Detail section's
CanShrink property to Yes.
 
Back
Top