Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to suppress the BLOB filed data? 4

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
Hi,
We are using CR 8.5 /SQL Server.
One of the report contains BLOB filed ( ie the Photo). As per reqirement, put that field in the report.

now the user need to display only the record contains photos in the list.

Example:
List of digital camara for sale

Photo Name Year

1 cccc 1999
...

under this list if the record don't have photo then suppress. (Here Photo column is a BLOB datatype)

Please let me know if you need more information.

Thanks
MK


 
You could try going to format->section->details->suppress->x+2 and entering:

isnull({table.photo})

I believe this will work for a BLOB datatype, but I might be wrong on this.

-LB
 
Hi LB, the Memo or BLOB datatypes are won't allow you to write formulas.
Thanks,
MK
 
Use a SQL Expression (Insert->Field Object->right click SQL Expression and select new->give it a name):

ISNULL(table.blob)

You can then use the field in suppression, or to eliminate the rows from the report in the record selection formula.

-k
 
does your main table have a field that would state if there is a blob file attached to that record.
like goldmine has a status field in each table and if the 2nd char =1 then there is a blob (memo) for that record.
so what i do is add another detail section and place the blob field (notes for the goldmine record) and then format the section with if mid(status,2,1,)<>1

this tells crystal to hide the section if there isn't a blob. you could have =1 and it would hide if there was a blob.
review your main table and try to find this field. it has to be there if it is a dbf file.
jill
ccc
860-529-6232
jillm@ccc24k.com
 
I don't have a memo field to test this on, but I believe you can use isnull({table.field}), although you probably have to type in {table.field}, since it won't be available on the field list.

-LB
 
LB: You can't use memo/blob fields in CR 8.5 formulas, not even for an isnull.

Jill: It's SQL Server, not xBase. Even it it were an xBase table, there isn't always an indicator field to demonstrate whether a blob field contains data, that was by design in Goldmine.

A SQl Expression is faster and simple to set up, so it should work fine.

-k
 
Thanks a lot for the responses.

HI K, you suggesed that using isnull(table.blob). Do I need to type the blob (image) field mamually?
because the blob field didn't show up in the list.

I typed isnull(Master.Photo) as well as I tried isnull({Master.Photo}). but it's not working.
Please let me know if you need more info.

Thanks,
MK
 
Dear SV,

I hate to correct you, but you CAN use memo blob fields in formulas in Crystal 8.5 to do an isnull() or not(isnull()).

You must, as LB indicated, type the the field name in manually as it will not appear in the available list of fields.

I guarantee that you can do this as I use this functionality all the time.

Rajrev:

As for the sql expression, again you must manually type the field name in, what I do is select a field from the list that I can see to get the format and then manually change the field name. Also, I like to do a case when:

Insert/Field Object/New/Name it something, ex: PhotoCheck

(Case when Table."Field Name" is null then 0 else 1 end)

Now, add the following to whatever other selection criteria
you have in place:

and
{%PhotoCheck} = 1

Regards,


ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thanks Ro, and please never hesitate to correct me ;)

Sorry LB, I wasn't aware of this as I've always used SQL Expressions and lived by the rule that > 254 fields can't be used in formulas.

-k
 
Its really wornderful.
Thanks ro, this is one of the good soultion I got from you.

Regards,
MK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top