10-21-2004, 02:33 PM
I'm trying to display text stored in a MySQL database blob field in a crystal report. It won't display the text because crystal reports interprets the field as a picture type. So if the blob field has a graphic stored in it, then it displays just fine. The only way I can get a large block of text to display is to store it in a longtext field. The problem with this is that I want to just have one column in my table that will either store a large block of text or an image. I know MySQL allows me to do this, but crystal reports doesn't seem to know how to handle it when it comes time to display it. Does anyone know a way around this problem without creating 2 separate columns in the table?
10-21-2004, 07:49 PM
Hmm..I don't think so. What version of Crystal Reports are you working with? Are you using an OLE Container, what is the exact control type you are using on the Report. The problem is, the report is expecting a graphic component, and it will not do the "intelligence" for you to evaluate the raw data and specify the output type.
10-22-2004, 07:59 AM
I'm using cr9 developer version. I don't think I'm using an OLE container. I'm not exactly sure what it is. Crystal Reports automatically creates a control type of "picture" when I connect it to a blob field and I don't think it will let me change it. I guess I can just create two separate fields in the table, one blob field if the record is a picture and one longtext if it's a text block. The problem with that is I will have an empty field on every record I store in the table because in every record I will either be storing a picture or a block of text...never both in the same record. Doesn't this create unnecessary overhead in the database?
10-22-2004, 05:05 PM
This is more of a Crystal Reports limitation than a database limitation. With proper design and maintenance, one additional field in your database shouldn't hurt. If you want to suppress a field if the value is null, you can use a suppression formula and code in various conditions to monitor whether the field is suppressed or not (check the database table for null, if true, then suppress is true, etc.)