on 01-26-2010 8:33 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
>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...
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.