none
Rich Text field in report issue RRS feed

  • Question

  • Access2010.accdb;  A text field in a report will not allow its property to be changed from plain text to rich text.  

    the underlying query's field, if optioned for plain text, displays the control characters.  change this query field to rich text and it displays normal rich text

    but the report is always displaying the control characters and when you select Rich Text, it immediately changes itself back to Plain Text.... am baffled...  

    the report is optioned for print preview.....as it is to be a printed document

    Tuesday, July 31, 2018 11:41 PM

All replies

  • Hello msdnPublicIdentity,

    What's the underlying query? Is it a table or indeed a query? If it is a query, how did you change type of a query field?

    If you try to add an unbound text box and try to change it Text Format, will it change itself back to Plain Text.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 1, 2018 6:14 AM
  • The report's record source is a query

    To change a field from plain text to rich text in a query; I highlight the field, and in the properties - there is a selector for this choice.  When I make that change then when the query is run - the field displays rich text correctly.

    The report, that uses this query - I have dragged on the text control bound to this same field, but it only allows itself to be optioned for plain text.  It offers the selection to Rich Text in the property - but it will not allow the selection.  The field displays the rich text control characters.

    I am wondering if the report property is controlled/inherited from the table's field property.  The table is SQL Server and the field is Long Text, Plain Text.  When its property is viewed from the Access front end (I am not able to view properties using SQL Server Manager in this situation) it states Plain Text and of course I cannot change that.

    The query object allows the change to rich text, and the data entry via form is rich text.  Looking at the table directly one sees the rich text control characters.  It is the report object alone which will not allow itself to be in rich text mode.

    Thursday, August 2, 2018 1:07 PM
  • Hi msdnPublicIdentity,

    The Rich Text property of the report control is indeed determined by the property of the table field. The type must be Long Text (former type of memo). However, you use SQL Server and I do not know if SQL Server supports the same option as an Access field.

    Thursday, August 2, 2018 9:54 PM
  • Hello,

    Did you try adding back the control on reports? It should work. Please see the article on the below link and let us know if that solves the issue.

    https://support.microsoft.com/en-us/help/839779/text-that-is-in-a-text-box-control-of-a-report-or-a-form-may-not-appea

    Friday, August 3, 2018 1:12 PM
  • the link is about the vertical property, with no mention of this rich text option issue.

    right now I am being led to believe that it is due to the table's property but I haven't had the time to resolve...

    it definitely is inconsistent that the underlying query can be changed to rich text option, and appears correctly while the report object does not....

    I would also be happy to abandon rich text and just have plain text but the rich text control symbols are through out the data and display - so at the moment I have no solution at all.

    Friday, August 3, 2018 1:17 PM
  • Well, I tried to replicate this issue on my end but no luck. I was able to convert the Text Format to Rich Text. I tested this on MS Access 2010, 2016 and Office 365. We might be able to help you if we get access to your database. Is there any chance you can send us your database and a dummy SQL BE? 
    Friday, August 3, 2018 1:29 PM
  • thank you for the reply; in your test, were you using sql server table as BE? … and if so, when you look at the table's field's properties via design view from the Access front end - is it: Long Text, Plain Text ?

    that is my case

    I will not be able to do any dummy - as this is a very large app; and will need to set up another test bed like you are doing.....

    Friday, August 3, 2018 1:33 PM
  • I would also be happy to abandon rich text and just have plain text but the rich text control symbols are through out the data and display - so at the moment I have no solution at all.

    Hi,

    Pardon me for jumping in but if you are okay with just plain text, maybe you could try using the PlainText() function. For example, create a calculated column like: PlainText([ColumnName])

    Hope it helps...

    Friday, August 3, 2018 2:40 PM
  • thanks for jumping in dbg, didn't know that function was out there - - will put that in place temporarily as it is definitely better than nothing at this point....

    still perplexed why the report object offers rich text, but won't let it stick to it when selected - - while the underlying query will....  but as contributed above it may be due to the table's field property though this behavior is inconsistent to my eye....

    Friday, August 3, 2018 2:47 PM
  • thanks for jumping in dbg, didn't know that function was out there - - will put that in place temporarily as it is definitely better than nothing at this point....

    still perplexed why the report object offers rich text, but won't let it stick to it when selected - - while the underlying query will....  but as contributed above it may be due to the table's field property though this behavior is inconsistent to my eye....

    Hi,

    Good luck! Let us know if you find a better solution.

    Cheers!

    Friday, August 3, 2018 2:52 PM
  • Hi msdnPublicIdentity,

    In my first reaction I was not entirely correct, but I think you understood me. For the completeness here a more correct answer.

    The TextFormat property of a TextBox object can be set to Rich Text. When this is set, rich text can be displayed. However, it is necessary that the data type of the table field is Long Text. If you were to create the field with DAO, you would have to use dbMemo for the field type.

    The above means that the format depends on the table field. But I do not know if SQL Server supports the same option as Access does.

    Friday, August 3, 2018 6:46 PM