Skip to Content
avatar image
Former Member

Is there a character limit for a field in CrystalReports?

Is there a character limit for a field in CrystalReports?

Hello,

I'm trying to display a long text (+100.000 characters) stored in a MySql database in CrystalReports but CR is not showing the complete text. Is this because there is a length limit for fields in CR?

Thanks,

Eddy G.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 26, 2009 at 01:37 PM

    Thanks for the answers.

    The field options are set so that it is possible for the field to grow, so that is not the problem.

    To be clear the textfiles are over 100000 characters long, stored as BLOB in MySQL.

    When i use the length() formula in CR to check the length of the textfields that are transferred to CR they all are 65534 long. So, i'm starting to believe there is a limit somewhere. Either in CR are in the MySql database. I just don't have a clue where and how to change this.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jamie Wiseman

      This is not a great answer, but you can base your report on a SQL Command, then use something like this for the command(MS SQL):

      select 
        case when length(table.field) > 65535 
            then substring(table.field,1,65535) 
            else table.field end as field_part1,
        case when length(table.field) > 65536+65535
            then substring(table.field,65536, 65535) 
            when length(table.field) between 65536 and 65536+65535 
            then substring(table.field,65536, length(table.field)-65535)
            else '' end as field_part2
      from table...
      

      Then in the report, display both fields where you want the BLOB data.

      HTH,

      Carl

  • avatar image
    Former Member
    Nov 26, 2009 at 10:30 AM

    There is no limit for a field in Crystal Reports.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 26, 2009 at 11:56 AM

    As per my understaning,There is no such limit.Please format your field and set can grow option.One more thing see it dba has set some limit from db side. I tested with more than 1000 characters in the formula as well as db field and ts not truncated.

    Hope this helps!

    Add comment
    10|10000 characters needed characters exceeded