Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a newbie question-continued 1

Status
Not open for further replies.

oracler

MIS
Oct 4, 2001
19
0
0
US
Sorry, this is from an old thread. But I got new question on it, so I repost the question again:

---------------------------
I got two tables. One is "employee", storing the information of employees, with "EmployeeID" as the primary key, and the other is"dependents", storing information of dependents of employees, with the "employeeID" as foreign Key.

I made a report. There is another small problem. I put all Employee's information into employee header and left the information of dependents in the details, but in my table, there are some employees who do not have dependent, so in my report, there are large blank under each employees without dependents. like this:

John Adams
Jane Adams, daughter
XXXX
Mike Adams, son
XXXX

Mike Taylor




Ken Bush
Jane Bush, Daughter
XXXXX

How to eliminate those blanks if the employee has no dependents. A similar question is: because some fields in my dependent table is not required, such as email address. So in my report, there is large blank too if we don't have the information of the dependent in several fields. How to solve this problem? Thanks a lot!
 
In the reports design view, set the properties for each field to "Can Shrink = Yes". This will fix the problem. I also reccomend setting the "Can Grow" property to yes, this will allow the fields to expand horizontally if the data does not fit in the field.
HTH -Michael MichaelHadden@AltaVista.Com
If you give someone a fish, you have given them a meal. If you teach someone to fish, you have given them MANY meals!
 
Hi, mhadden. I tried your method but it doesn't work. I think this property is suitable for those fields which can have value, say one line or many lines, so the fields can shrink vertically to fit the values. However, in my report, many fields can be "null", so the blank is still there when you set "Can Shrink = Yes".
 
Try setting the properties of the detail section itself to can shrink or can grow. Maq B-)
<insert witty signature here>
 
Hi!

The Detail section of the report has a Format event procedure. In that procedure you can check the appropriate values and any control which contains a null value, you can set its visible property to false. Also, the detail section itself has a Can Shrink property which can be set to yes. I've not tried either of these suggestions, but one or the other, or both used together, may give you what you want.

hth Jeff Bridgham
bridgham@purdue.edu
 
Have you tried setting the &quot;Can Grow&quot; and &quot;Can Shrink&quot; in the DETAILS properties as opposed to the Text field properties.

I haven't tried it, but I think that may work.

Z
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top