Field text is being truncated inconsistently

11,322

Solution 1

Mine worked by simply going to the Database Menu option: Database-->Verify Database, and the field sizes were updated

Solution 2

It could happen if the length of the field in the Data Source is less than your string. To check this:

  1. In the Field Explorer right click on the data source name and choose "Show Field Type"

  2. The length of the field is written between ( ). If it is less than your string length, you have to re-build your data source. For example, if your data source is a view, you have to drop and create it again and then verify your data base in crystal report.

Hope it helps.

Share:
11,322
Admin
Author by

Admin

Updated on June 28, 2022

Comments

  • Admin
    Admin almost 2 years

    I created a label report (2 columns). The fields used are, Suffix, Contact Name, Company Name, Job Title and Department – simple contact data.

    The Department field is the last one and in the report of 78 records the Department field decided not to display the entire field text twice.

    I have "Can Grow" set as default on all fields, I checked the margins and label width to ensure the text is not being truncated because of the labels being too wide for the margins. I modified the data in the database by abbreviating certain words and it shows the change but it still truncates after 50 characters. Other times the Department name is 80+ characters and it displays all of the data.

    This problem is happening onscreen when I preview the report and also when various users print it. The default printers have not changed.

    This one has me stumped. Is this an application bug (if so is there a Service Pack for CR 11.5?) or does it have anything to do with printer drivers in need of update?

    Thanks in advance for your help on this puzzle.

    Update

    1. I did specify data source
    2. The text in the database is without any special characters or anythig else that might be out of place
    3. No I am not using Underlaying Following sections anywhere in the document
    4. 11.5.8.998 is my version of CR (lloks like I am behind - however, when I click on verify for updates it tells me there aren't any. Do you ahve a link to the SP2 download?)
    5. No formula in the Custom string option
  • user123456
    user123456 over 10 years
    Thank you for your response. I have the same problem excatly, but my database field value is in XML format. Do you think I need to parse or do any logic before try to display data ?
  • PowerUser
    PowerUser over 10 years
    Not sure. I never ported XML data into CR back when I was using it. I suppose you could try declaring that field as a string/text and seeing if it changes anything. Good luck.
  • user123456
    user123456 over 10 years
    It is string. But the string format is xml. So I have something like this : <root><T><name> ALi</name></T></root> saved in my database column as string. When I try to show that field in the report, it has like 654 character, it is truncated to 255 exactly. Thanks for your response.
  • PowerUser
    PowerUser over 10 years
    I think your question is sufficiently different from @Calypso's question. Try posting it as an independent question. Don't forget to include XML and Crystal Reports as tags. Also, CR is not a high volume subject on this site, so it may take some time to get any useful answers back. Good luck.
  • MikeTeeVee
    MikeTeeVee over 3 years
    I wasted so much time clicking Refresh (F5) and wondering why data was truncated and some filters were not working for some longer strings I added. I had to do the Verify-Database and re-enter manually by hand oodles of Parameters for our Sproc and Sub-Reports, for it to finally work. Keep this in mind if you change the sproc to use a longer hard-coded string (or increase the length of a Column in a Table used by the Sproc). You will have to go back and do this for ALL the Crystal Reports that use it. I cannot stand this. Thank you for your help.