ReportField with multiline text

I have a Windows App with a report. The report has a ReportField on it and I’m trying to load text from a MSSQL Database into the report field. The report field is in the body section of the report.

On my dev environment (compiled or in the IDE), the field displays correctly with the multiline text. However, on my customer’s site, the text simple will not display. The ReportField is blank. I’ve checked to make sure there is data in the database and that the results are returning the text (I’ve put in MsgBoxs to display the result) but the ReportField resolutely remains blank. I’ve also put a message box in the ReportField’s BeforePrinting event which displays the ReportField’s Text property and there is text in the property.

Does anyone have any ideas why I’m not seeing anything at my customer’s site?

Thanks in advance.

Also, if the data does NOT contain any EndOfLine characters, the text is displayed at the customers site. So it’s only if the data contains CRLF that the data does not display.

Could it be that these CRLF’s are pushing the text outside the view-able area? Perhaps try removing the CRLF’s in the before print event.

You could also apply the code to allow the band & control heights to grow/shrink depending on the amount of data being output. See this conversation to see how.

@Wayne Golding - Unfortunately not. I can have a single line of text with a CRLF at the end and nothing is displayed. And the very same text is displayed fine on my PC. Thanks for the suggestion.

Make sure the text doesn’t include any non-visual data. For instance a chr(0) at the beginning could cause the data to not appear.

Are you both using the same physical data in search of the problem? Is it possible that you guys are interpreting the same data with different collations and receiving different “bytes”?

Thanks for your suggestions.

@Rick Araujo - the database on site is using the same collation as mine. I’ve also tried making sure the encoding is the same.

@Greg O’Lone - If I have a single line of text, this displays fine. If I go to the end of that line of text (which is in a textbox) and I hit return, the text is then not displayed on the report. They are using a different printer on site (a Xerox printer).

I’ve had to abandon this as a Xojo report as I simply can’t get it working. I’m now producing a PDF version using MonkeyBreads DynaPDF plugin and printing that instead.

This is happening with another report. I don’t have the option to rewrite all of my reports so I need a fix here.

So, the problem is, if the text I’m trying to display on a report.ReportField contains a carriage return CRLF, none of the text appears. If I edit the data and have a single line of text, this does appear. This only happens at my customers site.

What I have noticed in my dev environment is that the text doesn’t align with the top of the Report field if there is a carriage return in it:

At the customer site, it looks like this:

Is there anything in the printer settings I need to look at?
Any suggestions?

Thanks in advance.

I have submitted a feedback report for this:
<https://xojo.com/issue/47053>