Solved

access 97 report hiding fields printing

Posted on 2002-05-17
7
358 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 52

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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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 100 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

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…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

691 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