Link to home
Start Free TrialLog in
Avatar of Bill Ross
Bill RossFlag for United States of America

asked on

Access Report Text is cut off

I have a report with a comments (memo) field.  The field is set to can grow/can shrink on the report.  Normally, all is OK but sometimes, the last line or two get cut off.

Ideas?
Avatar of PatHartman
PatHartman
Flag of United States of America image

Is the detail section also set to can grow/can shrink?
Avatar of Bill Ross

ASKER

Yes, the control is in the detail and both the control and the section are set to CanGrow/CanShrink=yes.  Also, as an aside, the behavior only seems to happen for users with Office/Access 2016.  No issues have been reported with Access 2007/2010 users although they may have the issue and just not reported it.  I cannot duplicate the issue.  It is random...
Is everyone using the same printer?
Does everyone have the correct printer driver installed?
Good point.  I will check.  Probably cannot find out until Wed.
<<Ideas?>>

 Your first check should be if the entire notes field is returned by the query the report is based on.   Some query operations will cause a memo field to truncate to 255 characters (i.e. a SELECT DISTINCT).  There are ways around that.

 Open the query on it's own and see if the data is there.   If the report is based directly on a table, this does not apply.

Jim.
Hi Jim,

Query returns correct data and it does not seem to be related to the data length.  According to the users, the report in question is missing one line of info.  I tested the query and the field data length is 975 characters.  I'm thinking it might be a font issue.  The report uses Arial font.  I'm having the user test to see if Arial is installed as well as the printer set up as suggested by Pat.

Other ideas?

Thanks,

Bill
<<  I cannot duplicate the issue.  It is random...>>

 Will be a tough one to nail down then.    

 Only other thing that comes to mind is that in the past, specifying a line spacing other than zero would sometimes mess it up.

 I think the key here though is to get a reproducible sample as it sounds like an A2016 bug.    The can grow/shrink has always been a bit of a pain.   Often it's not obvious what the cause is because there are so many factors involved.

 When I have a problem like this with a report, I usually strip every special feature out (keep together, forcing page breaks, etc) except for the one feature that is not working.   I get it working (or realize it doesn't work at all), then add in each feature until I find the problem.

Jim.
OK.  Thx.
No help.  Various printers and Arial font installed.  Only last line is cut off and it is seemingly random.  Only Access 2016/Win7 but I cannot duplicate on my test machine.

Any other ideas?

Thanks,  Bill
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Big is not an option as some comments are only one or 2 lines and that would be problematic leaving half the page blank.  I will try the different font idea.  Thanks,  Bill
<<Big is not an option as some comments are only one or 2 lines and that would be problematic leaving half the page blank.  >>

 It shouldn't leave any blank space.....make the control big and set it to can shrink.

Jim.
Hi Experts,

Well I finally went to the client and saw the issue.  Could not duplicate it on my set up.  Turns out the user copied text from MS Word into the comments field.  There were hidden characters causing the issue.  I copied to notepad and pasted back into the memo field and report worked fine.

Does anyone know how to prevent this?  Strip out the non-text characters?  It's a simple text box with maybe 2000 text characters.

Thanks,

Bill
You'd have to loop through the text looking for characters outside of the normal ASCII range.

There's nothing built in that would do it for you.  Plenty of code examples floating around.

Using Like:

https://www.experts-exchange.com/questions/24454280/Best-way-to-remove-non-ascii-characters.html?anchorAnswerId=24520543#a24520543

Using InStr (my choice):

https://www.experts-exchange.com/questions/24454280/Best-way-to-remove-non-ascii-characters.html?anchorAnswerId=24529399#a24529399

Jim.
Hi Jim,

Thanks and thanks to you all.  Problem solved.

Bill
The font suggestion was the key.  I really appreciate the help!  Thanks, Bill