Removing empty fields and empty area from the report

teachme

Registered User.
Local time
Today, 00:49
Joined
Oct 26, 2015
Messages
84
Hi,

I am working on a report where I have 10 lines. I dont want the blank lines to show up on my report which I was able to accomplish by setting the Can Shrink property for the lines/fields to 'Yes' but the problem I am having is that the blank lines dont show up on the report but the blank area where there is blank lines still shows up on the report.

I have tried going to design view and under 'detail' section of the report, clicked and changed the can shrink in properties to 'yes' but the blank area still shows up.

Any help is appreciated.

Thank you
 
First how are blank lines getting into the report? Can you change the record source so that they are not in the report in the first place?

Anyway I made a report with blank lines just to see what might be going on and it appears that while the Can Shrink set to Yes shrinks the textboxes, it doesn't shrink the space between them. So if you have space inside the detail area that's outside the textboxes like:

attachment.php


Then move the footer up so it's like:

attachment.php


If you need help with adjusting the record sources you can upload your database and I'll see what I can come up with.
 

Attachments

  • Screen Shot1.png
    Screen Shot1.png
    13.8 KB · Views: 3,350
  • Screen Shot2.png
    Screen Shot2.png
    9.8 KB · Views: 3,206
First how are blank lines getting into the report? Can you change the record source so that they are not in the report in the first place?

Anyway I made a report with blank lines just to see what might be going on and it appears that while the Can Shrink set to Yes shrinks the textboxes, it doesn't shrink the space between them. So if you have space inside the detail area that's outside the textboxes like:

attachment.php


Then move the footer up so it's like:

attachment.php


If you need help with adjusting the record sources you can upload your database and I'll see what I can come up with.


Thanks but I dont think I explained my issue properly.

I am building a db where there is 10 fields (lines) associated with one record (a project). Some of the records (projects) may have 3 fields entered by the user, some 5 and some up to 10. For the projects that will have say 5 fields, the remaining 5 blank fields dont need to show up on the report - which I was able to accomplish through the can shrink property. But I cant get rid of the blank space from the report that is created if not all 10 fields are populated by the user.

See attached screenshots. I am trying to get rid of the space that has the crosses.
 

Attachments

  • 10 fields.PNG
    10 fields.PNG
    10.5 KB · Views: 300
  • blank space.PNG
    blank space.PNG
    15.8 KB · Views: 263
Yeah when you said lines I was thinking records so I understand now this has to deal with fields. Also I didn't realize that textboxes could shrink. Anyway I've play with this more and I find that the detail area does shrinks when the textboxes shrink so now I wonder if you have have some sort of layout that's inhibiting the shrinking. Did you let Access create this report for you or did you create it from scratch? When I let Access create a report I notice it throws in a lot of annoying layouts.

If you upload your database I'll see if I can figure it out, but probably tomorrow.
 
Its a big db file - not sure ow I can upload it but any help/tip is greatly appreciated. thx
 
is this a sub report? you can make it can grow/shrink (the sub report).
and on its datasource limit only with data.

dont hard-code 10 lines on your report.
 
is this a sub report? you can make it can grow/shrink (the sub report).
and on its datasource limit only with data.

dont hard-code 10 lines on your report.

Hi - this is a report based on a query. Not sure what sub report means.

What do you mean by 'and on its datasource limit only with data'? Are you referring to a property of a report that I may have to change?

10 lines/fields are not hard coded on the report. They are part of a record and i need to show them on the report if there is data.

Thanks
 
sorry for the confusion, use query as data for your report.
if your detail section is same as with mr.sneuberg's, then you can totally eliminate those blank records using query, ie:

select * from table where not (([FieldName]) is null);
 
I think we need to see this to advise you. Could you make a copy of your db, delete the objects not related to this thread, compact and repair, zip it and upload it?
 
Make sure that each detail and grouping section of the report is also set to can shrink = yes, it should then also reduce in height. And often on a report it won't format correctly until you use print preview.
 

Users who are viewing this thread

Back
Top Bottom