A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How create report where data may or may not be there?



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2004, 09:56 PM
david
external usenet poster
 
Posts: n/a
Default How create report where data may or may not be there?

I have to code a report where columns in my table may be blank or not from record to record.
I need to shrink the space where these columns are blank. How?

Also where and why would I ever need a subreport. I'm changing a report that has 2 subreports and I cant figure out why they were used. There is not a one -to-many relationship. The data may be there or not however.
  #2  
Old May 21st, 2004, 04:05 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default How create report where data may or may not be there?

The best solution might be to look at these fields and see if you could
create a related table for them. For example, if you are listing the
students in a class, and have fields called: Student1, Student2, etc, it
would be better to create another table that has field: ClassID (which
class) and StudentID (which student), with a record for each student in each
class.

If that is not appropriarte, open your report in design view, and set the
CanShrink property of the text boxes (and also the CanShrink property of the
Detail section). They can then shrink to zero height if they are null. If
the text boxes have attached labels, that won't work because Access has to
print the labels. You can get around that by changing the attached label
into a text box, with Control Source of:
=IIf([City] Is Null, Null, "City:")
where "City" is the name of the field that it was attached to.

Unlike forms where you need subforms to enter related records, you do not
need subreports often because you can use a query and combine multiple
tables. They are sometimes useful for related data, for combining disparate
reports into one printout, for controlling how the pages break, etc. You'll
know when you need one.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"david" wrote in message
...
I have to code a report where columns in my table may be blank or not from

record to record.
I need to shrink the space where these columns are blank. How?

Also where and why would I ever need a subreport. I'm changing a report

that has 2 subreports and I cant figure out why they were used. There is not
a one -to-many relationship. The data may be there or not however.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.