Skip to Content
author's profile photo Former Member
Former Member

Incorrect translation of a Mediumint field

I have a field in a MySQL database that is a Mediumint data type, when it is displayed in Crystal Reports it is read as a memo data type. The problem comes in that the field in the MySQL database looks like this:

a:1:}

and in Crystal Reports looks like this:

613A313A7B693A32383B613A323A7B693A303B733A31333A22416E6E6F756E63656D656E7473223B693A313B693A303B7D7D

Is there a setting I can change to make this display probably? Also, can I make Crystal Reports read this as a string instead of a memo so that I may manipulate it?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 26, 2010 at 09:57 PM

    Hello,

    What version of Crystal Reports are you using and how are you connecting to the database?

    If using ODBC then go to the Buisnessobjects tab above, Downloads and install all the patches for your version and test again. If it still doesn't work then download our DataDirect 5.3 version of our connectivity package and test using one of those drivers.

    If you copy the SQL into some other ODBC test tool does that work? As suggested, it may be that your DBA needs to change the field type.

    Thank you

    Don

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 26, 2010 at 09:11 PM

    You might cast it as a string:

    cast (source expression as datatype)

    For example if you have a memo field which runs on forever, you could say:

    cast (problemfield as char(8000))

    Which should convert problemfield from a memo to a 8000 character string...

    Add a comment
    10|10000 characters needed characters exceeded

    • >

      >My DBA's are convinced I can solve this in Crystal Reports and would like to not have me make them change anything on the database side.

      DBA's are always convinced that they don't have to overextend themselves. 😊

      In the Database Expert, instead of selecting a table from the database, you can click the Add Command option and you will be given the opportunity to enter a SQL query.

      Fuskie

      Who recommends reading up on the feature in the online documentation if interested...

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2010 at 02:31 PM

    The data is showing up as it should in the field, but I still can't convert it into another field type so that I can manipulate it. I will talk to my DBA's and try to convince them to change the type. Thanks for the help.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.