VIP 2.1 Data objects to 2.5 Data Objects (ViP Specific)
At 22 JUL 1998 05:33:27AM David S. Rawlins wrote:
I recently upgraded an application from 2.1 to 2.5. Only to discover that a lot of the Reports no longer printed certain sections of text. Upon investigation it appears that the local data objects we use to format the data before printing no longer accept text longer than 512 characters!
If anyone has a solution other than cutting the text into 512 character chunks I would be gratefull.
David Rawlins
At 22 JUL 1998 10:54AM John Averell Revelation wrote:
David,
It is unclear from your question just where data is being truncated. We have not had any instances of data truncation in data objects when acquiring data from a Notes or ODBC sources (at least since 2.2 release.) There is an overall limit on text strings of either 32K or 64K (depending on the object.)
Text boxes can be used to transfer long text strings successfully. It is important to configure the text field as Multiline however to see it.
Report fields also can accept long text. They must be setup as multiline fields, with autosize Rows checked.
There is one issue with Report fields. If your text stream has no white spaces (space or tab characters) then the wrap will not occur. It would be very unusual to have that many characters without a space at some reasonable length (i.e. a word so long.)
If you have done all these things, I suggest you track the steps to find out just where text truncation is occurring.
John
At 28 JUL 1998 10:16AM David S Rawlins wrote:
I have a number of reports that are reading data into local data objects before printing them out using Report Designer. In such cases I find that this line works:
Call Local_Data.CellSetDataVar(retrow&, Local__Col%,left$(BigLong$,511))But this line:
Call Local_Data.CellSetDataVar(retrow&, Local__Col%,left$(BigLong$,512))results in a blank cell in the data object.
At 28 JUL 1998 01:55PM John Averell Revelation wrote:
Could you please try one thing more. Separate the methods for CellSetDataVar and left$ by doing the test in two steps. I'm not sure that Print will output long text either, so I am also putting the test strings into a TextBox, which I know works OK (be sure to set Multiline option). You can examine both then during Print statement.
Text1.text=BigLong$
Print BigLong$ 'Make sure the data is really there
s511$=left$(BigLong$,511)
Text1.text=s511$
Print s511$
s512$=left$(BigLong$,512)
Text1.text=s512$
Print s512$
'Thus making sure it is not left$ that is failing.'if OK, then:Call Local_Data.CellSetDataVar(retrow&, LocalCol%, s511$) Text1.text=Local_Data.cellGetDataVar(retrow&, LocalCol%,2)
Print Local_Data.cellGetDataVar(retrow&, LocalCol%,2) Call Local_Data.CellSetDataVar(retrow&, LocalCol%, s512$)
Text1.text=Local_Data.cellGetDataVar(retrow&, LocalCol%,2) Print Local_Data.cellGetDataVar(retrow&, LocalCol%,2)
'and see which fails if anyIf neither fails, we have to think some more.
At 29 JUL 1998 06:18AM David S Rawlins wrote:
John,
I entered your code (I had to add the WhereFound% parameter to the cellGetDataVar statements). Surprisingly I found that all the print statements worked. I had expected the last one to fail.It appears as though the CellSetDataVar statement will set the cell with BigLong$ where the CellSetDataFromResult will not. However the Report still gives up when the text length goes over 511 characters!
At 29 JUL 1998 10:11AM John AverellRevelation wrote:
David,
OK, you've done a good job tracking things down. I don't know what is happening on CellSetDataFromResult. I looked at the code, and nothing jumps out, although different code is used from CellSetDataVar. I guess don't use the "FromResult" method in this case.
I worked from the report end to see what I could find. The bottom line is that the PrintPreview view of the report is often truncated at some line for long text. However, if you actually print the report, the full text shows up. I have gone up to over 700 characters with no trouble. I think PrintPreview is meant for just that, primarily to look at layout.
It is important that the text is broken up into words of reasonable length. A word is delimited by space, tab, or new-line. A word over 511 characters will definitely not work.
The report design must have the "Autosize Rows" checked. If you are designing on an NT machine, there is a bug!! The display box that shows this option in the design page is actually read-only. Checking the box here will not stick. You must instead right-click on the TitleBar and select "Band_Options" and then "Autosize Rows". This will stick when you save the design.
I only just found this out in responding to your question. Does not happen on Win95/98.
At 30 JUL 1998 05:26AM David S Rawlins wrote:
John,
Can I e-mail you a small example app to look at? My e-mail address is [email protected]
At 03 AUG 1998 08:26AM John Averell Revelation wrote:
Hope this fixes the problem.
At 13 AUG 1998 08:53AM David S Rawlins wrote:
After much testing this seems to solve the proble of transfering long text to a local data object. Unfortunately it does not solve the problem of being able to print more than half a page of text.
Cutting text into smaller chunks is not always appropriate and so we've decided to look for other reporting solutions.
David.