[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

access 97 report hiding fields printing

Posted on 2002-05-17
7
Medium Priority
?
366 Views
Last Modified: 2012-06-21
I use access 97; i have created a report; some fields are empty.

question : if a field is empty, how can i suppress the text before a field, that it will not be printed

example

color : blue   --> must be printed
color :        --> field is empty; do not print this line
0
Comment
Question by:ludoverstraete
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 7015807
Is what you like is to do is hide the 'color:' caption in report when a field is empty?

Maybe your SQL should be like this:

Select IIF(ISNULL(table.color),"","color: " & table.color) As color, field2 from table

That's include the 'color' caption as a part of a field.

regards
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7015849
why not omit these rows from the SQL:

where NOT(thatcol IS NULL)

CHeers
0
 

Author Comment

by:ludoverstraete
ID: 7015874
sorry ,  i have a table with a field called color and the filed contains colors (white, blue,...) my problem has nothing to do with colors of fields if you understand what i mean;
other example a database with fields
car ,     company,   drivername
volvo     aml        guust
bmw                  peter
mercedes  microsoft  jan

in the record bmw the company field is empty

report :
car volvo
company aml
drivername guust

car bmw
drivername peter

car mercedes
company microsoft
drivername jan


0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7015938
Unless you change your query and report design completely, this will not be possible as far as I know Access.
Sorry
0
 
LVL 5

Expert Comment

by:bob_online
ID: 7016043
In the OnFormat Event of the reports detail section and the following

lblColor.Visible = Cbool(Not IsNull([txtColor]))

This will format the label for EACH record in the report, turning it on or off based on whether or not the value of txtValue is Null.

If the IsNull doesn't do the job, try Cbool(Len([txtColor]) > 0)
0
 

Accepted Solution

by:
ncrew earned 400 total points
ID: 7016248
We had a similar situation so I think this will work for you.

Assuming that your report is built off of a query:

Remove the label "Color" from your report.

In your query, create a calculated field using the following code:

ColorLabel: IIf(IsNull([Color]),"Color","")

On your report where you had your "Color" label, insert a text box for the new ColorLabel field you created in your query.

Size the "ColorLabel" field and the "Color" field to the point that it looks like a line.

Set the Can Grow and Can Shrink properties to "Yes"

This way, if there is data it will appear, and if there is not data, it will not appear.

0
 

Author Comment

by:ludoverstraete
ID: 7017411
ncrew  had the correct answer, but is's a lot of work
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question