UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Textbox Limited To 255 Characters In Report Header, Access 2016    
 
   
kmeadows79
post Feb 26 2018, 04:26 PM
Post#1



Posts: 49
Joined: 10-August 17



I have a report rptNoticeExtension based on a query qfltNoticeExtension. The report header is a cover letter with a paragraph created as an expression in the query with the name Paragraph. When I assign the textbox txtParagraph the Control Source Paragraph the text truncates after 255 character when the textbox is in the header. However, when that same textbox is in the Detail portion of the report it displays the entire text.

I've tried to start with an Unbound textbox and assign the Control Source and I've tried dragging it from the Add Existing Fields window with the same problem. The textbox is more than large enough AND I have Can Grow set to Yes. I've also tried changing it from Plain text to Rich text and back again. I'm beginning to wonder if there is an innate limit to textboxes in the Header as nothing else makes sense at this point.

Thanks in advance for any advice.

Katie
Go to the top of the page
 
kfield7
post Feb 26 2018, 04:39 PM
Post#2



Posts: 875
Joined: 12-November 03
From: Iowa Lot


While I haven't had this particular problem, I do know that anytime a memo field is sorted in a query, so I assume also a report, it gets truncated.

One solution might be to put it in via VBA in the on print event of the report.

or maybe On Format.
This post has been edited by kfield7: Feb 26 2018, 04:40 PM
Go to the top of the page
 
kmeadows79
post Feb 26 2018, 04:51 PM
Post#3



Posts: 49
Joined: 10-August 17



@kfield7 - I'm working in 2016 so I do not have memo fields in the source table. The three values embedded in the text string in expression Paragraph are as follows: short text field from source table, integer field from source table, and date field from source table with appropriate formatting for letter. I guess I could try to assign the textbox value from the OnLoad event for the print preview.
Go to the top of the page
 
kmeadows79
post Feb 27 2018, 09:48 AM
Post#4



Posts: 49
Joined: 10-August 17



I've switched txtParagraph on rptNoticeExtension to an unbound textbox, sent the embedded data for the paragraph as OpenArgs from the form call to OpenReport and assigned the constructed paragraph string to txtParagraph. This does get me what I'm trying to achieve but I feel there has to be a better way. The constructed string is already sitting in the query connected to the report. It seems silly to have to construct it again in the report. It also makes the report useless without the form as txtParagraph has to be unbound with no data in order for this work-around to work.
Go to the top of the page
 
zaxbat
post Feb 27 2018, 10:23 AM
Post#5



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


I have passed values in the parameters before.....yeah, pretty cumbersome and problematic.

Now I do it like this (see below), a lot cleaner, simpler, easier to maintain. I just designed a textbox called TestTxtBox and placed it into the report header. Can grow and can shrink are 'no' but i set the font size to 6 and the box is pretty big so it does not fill it anyway. That is about 300 chars....so it got past the 255 boundary...guess it would go as far as you are likely to need. Cheers!



Private Sub Report_Load()
TestTxtBox.Value = _
"AAAAAas;lkjs;l as;lkfj ;asldk jfsdlkj f;lsdkjflsdkfj lsdkfj lsdkjf lskdjf lksdjf lksdj flksjd flks j" & _
"BBBBBkfjsdlfk jsdlkfj lkfj lsdkj flsdkjf lsdkjf lsdkjf lsj flskdjf sldkj fslkdjfls dkjf sldkjf lskdj" & _
"CCCCCslkdfj slkdjf slkdjf lskdj flskjdf lskdj flskdjf lskj flskjd flsd lskdjfsl fjsldkjslkk jfsthere"
End Sub
This post has been edited by zaxbat: Feb 27 2018, 10:36 AM

--------------------
Kindest regards, and Cheers!
ZAX

A picture is worth a thousand words and a zipped DB is worth a thousand pictures.
Oh, and....please don't disappear into the Twilight Zone.... Holler back with your results!
Go to the top of the page
 
kmeadows79
post Feb 27 2018, 10:49 AM
Post#6



Posts: 49
Joined: 10-August 17



@zaxbat - This is what I've switched to and I'm not having problems with the text truncating.

The original question is: WHY is the textbox truncating when the constructed paragraph is an expression from the query? It is ONLY truncating when the textbox is in the header of the report. It does NOT truncate when placed in the detail. I don't understand why it truncates in one place and not the other.
Go to the top of the page
 
zaxbat
post Feb 27 2018, 10:53 AM
Post#7



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


Right. Sorry. In Access I run into so many weird quirky things that seem completely inexplicable....I have wasted many hours trying to find answers.....now, usually, I don't dwell, just find a way around it and keep on coding....
This post has been edited by zaxbat: Feb 27 2018, 10:54 AM

--------------------
Kindest regards, and Cheers!
ZAX

A picture is worth a thousand words and a zipped DB is worth a thousand pictures.
Oh, and....please don't disappear into the Twilight Zone.... Holler back with your results!
Go to the top of the page
 
kmeadows79
post Feb 27 2018, 11:03 AM
Post#8



Posts: 49
Joined: 10-August 17



@zaxbat - I agree there do seem to be a number of quirky behaviors. Most, though not all of time, I later realize that I did some messed up little thing or it just behaves differently than I expect. I've had to go back and "fix" things more times than I care to admit. I'm trying to just get it done correctly the first time mostly because I know I'm going to be doing this similar thing on several more reports. That said the report is functional and I'm moving on and will probably find a solution to my problem in the next week then go back and change stuff. Thanks though!
Go to the top of the page
 
zaxbat
post Feb 27 2018, 11:05 AM
Post#9



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


SanFranTastic!

Concerning many things in life....it sux to be stuck!

Have a good one!
This post has been edited by zaxbat: Feb 27 2018, 11:06 AM

--------------------
Kindest regards, and Cheers!
ZAX

A picture is worth a thousand words and a zipped DB is worth a thousand pictures.
Oh, and....please don't disappear into the Twilight Zone.... Holler back with your results!
Go to the top of the page
 
theDBguy
post Feb 27 2018, 11:31 AM
Post#10


Access Wiki and Forums Moderator
Posts: 73,257
Joined: 19-June 07
From: SunnySandyEggo


Hi Katie,

Pardon me for jumping in and sorry if your problem is already fixed. Did you happen to have anything in the Format property of the Textbox in the report header? If so, see if it helps any if you take it out.

Just a thought...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
kmeadows79
post Feb 27 2018, 02:14 PM
Post#11



Posts: 49
Joined: 10-August 17



@theDBGuy - I'm still looking for a solution to my problem. I have a work-around but I don't particularly like the way it's handled. I just checked the Format property of that textbox and it is blank. I also tried deleting anything that *might* be there and it is still truncating after 255 char.
Go to the top of the page
 
zaxbat
post Feb 27 2018, 02:20 PM
Post#12



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


Here is a guy from the UK that implies the limitation of 255 is because the data comes from a text field and needs to come from a memo field. Might give that a try.

https://access-programmers.co.UK/forums/sho...ad.php?t=123280

--------------------
Kindest regards, and Cheers!
ZAX

A picture is worth a thousand words and a zipped DB is worth a thousand pictures.
Oh, and....please don't disappear into the Twilight Zone.... Holler back with your results!
Go to the top of the page
 
kmeadows79
post Feb 27 2018, 02:35 PM
Post#13



Posts: 49
Joined: 10-August 17



@zaxbat - I had come across similar posts during my research. The problem is Access 2016, which is what I'm working in, no longer has anything named memo. The data type previously known as memo is now long text. To my knowledge, a textbox handles both short and long text data types. I don't know if there is a way to define the constructed expression Paragraph in my query, qfltNoticeExtension, as a long text data type. I think it's just a string.
Go to the top of the page
 
zaxbat
post Feb 27 2018, 02:38 PM
Post#14



Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


Ah.....
Notes
Memos
Blobs

by whatever name are necessary....we just need to figure out what they are called now....very difficult to believe they would just be thrown out...

I will persevere.....for a while anyway...ha h ah ah h ah ah ah ah

--------------------
Kindest regards, and Cheers!
ZAX

A picture is worth a thousand words and a zipped DB is worth a thousand pictures.
Oh, and....please don't disappear into the Twilight Zone.... Holler back with your results!
Go to the top of the page
 
theDBguy
post Feb 27 2018, 02:40 PM
Post#15


Access Wiki and Forums Moderator
Posts: 73,257
Joined: 19-June 07
From: SunnySandyEggo


Hi Katie,

Pardon me but we could probably help you find the solution faster if you could post a sample copy of your database with test data only.

Just my 2 cents...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
kmeadows79
post Feb 27 2018, 03:04 PM
Post#16



Posts: 49
Joined: 10-August 17



I've attached the database with just the necessary form, query, report and tables. If you select "Winnebago" from the County combobox and enter 2015 for Tax Year (other combination may not produce data) and click Preview the report will display in preview mode. I've also left the code in the Report_Load section but commented it out. This was my work-around, but only works if I change txtParagraph to Unbound.
Attached File(s)
Attached File  Textbox_truncating_in_report_header_problem.zip ( 223.08K )Number of downloads: 7
 
Go to the top of the page
 
theDBguy
post Feb 27 2018, 03:38 PM
Post#17


Access Wiki and Forums Moderator
Posts: 73,257
Joined: 19-June 07
From: SunnySandyEggo


Hi Katie,

Thanks for posting a sample. I verified the problem you mentioned. I decided to send a call for help. I'll let you know if I hear anything.

Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
kmeadows79
post Feb 27 2018, 03:44 PM
Post#18



Posts: 49
Joined: 10-August 17



Thanks!
Go to the top of the page
 
theDBguy
post Feb 27 2018, 05:19 PM
Post#19


Access Wiki and Forums Moderator
Posts: 73,257
Joined: 19-June 07
From: SunnySandyEggo


Hi Katie,

So far, the only explanation we can come up with is the Report Header must be doing some sort of a field translation processing behind the scenes, which is converting any calculated columns in the Record Source as a Text data type. We can confirm this if we add a Long Text field in the table and then add a bound Textbox in the Report Header. We will see the full content of the bound field show up in the Report Header. However, if we use a query and concatenate anything to this memo field, then the Report Header truncates it.

Since the problem does not exist in the Detail section, the attached is the best workaround suggestion I received. It does not involve using any VBA code. Essentially, I added a hidden bound Textbox in the Detail section and referenced it in the Paragraph textbox in the Report Header.

Hope it helps...

PS. Once/If I hear a better explanation for this problem, I'll let you know. Cheers!

Attached File(s)
Attached File  Textbox_truncating_in_report_header_problem.zip ( 85.74K )Number of downloads: 1
 

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
kmeadows79
post Feb 28 2018, 11:56 AM
Post#20



Posts: 49
Joined: 10-August 17



Thank you, zaxbat and theDBguy. I ended up using the solution theDBguy posted. I'm a little happier with how it works!
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search
RSSSearch   Top   Lo-Fi    24th September 2018 - 05:09 AM