Access Report Text is cut off

Bill Ross
Bill Ross used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017

Commented:
Is the detail section also set to can grow/can shrink?
Bill RossProgrammer

Author

Commented:
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...
Distinguished Expert 2017

Commented:
Is everyone using the same printer?
Does everyone have the correct printer driver installed?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Bill RossProgrammer

Author

Commented:
Good point.  I will check.  Probably cannot find out until Wed.
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
<<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.
Bill RossProgrammer

Author

Commented:
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
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
<<  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.
Bill RossProgrammer

Author

Commented:
OK.  Thx.
Bill RossProgrammer

Author

Commented:
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
President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012
Commented:
Is this at the bottom of the section and when does it truncate?   Bottom of page or no?

Not sure what the layout of the controls is, but only thought at the moment is to make it really big and let it shrink.

I might also play with the width and along the lines of Pat's suggestion, try a mono-spaced font (Courier New or Lucida Sans Typewriter).  There are some others floating around as well.

Jim.
Bill RossProgrammer

Author

Commented:
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
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
<<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.
Bill RossProgrammer

Author

Commented:
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
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
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#a24520543

Using InStr (my choice):

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

Jim.
Bill RossProgrammer

Author

Commented:
Hi Jim,

Thanks and thanks to you all.  Problem solved.

Bill
Bill RossProgrammer

Author

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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial