?
Solved

access 97 report hiding fields printing

Posted on 2002-05-17
7
Medium Priority
?
360 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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