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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|