Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Blob in Crystal Reports

170 views
Skip to first unread message

MrT

unread,
Jun 2, 2006, 11:37:24 AM6/2/06
to
Hi:

How can one get the memo text our of blob for use in a report
directly. In other areas I save blob to file and use file text but I
want to do it directly if possible.

Thanks.

Best regards

MrT

unread,
Jun 2, 2006, 8:47:58 PM6/2/06
to
Hi All:

Some progress. Using ADO/ttx I changed field definintion in ttx from
Blob to String 4096 and used that in a variable in the Crystal Report.

That worked up to a point. It showed up in the report up to the f in
of by the ^ and nothing more.

Could this be a limitation in Interbase

Dear Mr. & Ms. XXXXXXX

This account is seriously overdue carrying a balance as far back as
December, 2005. Please bring this account current.

If you need to discuss this balance or any of the current or past
due charges, please contact the of fice at (517) 782-4384.
^

I then deleted the blob and added back in with segment size 8192
instead of 2048 and got two f's instead of one at ^ above.

I find this very interesting. Any suggestions here? Is it somehitng
to do with fetching from the blob????

Best regards

Van den Wouwer Danny

unread,
Jun 3, 2006, 2:45:32 AM6/3/06
to
How did you convert this blob to a varchar?

Using the f_blobaspchar of the FreeUDFLib?
If yes, there are some errors in the blob functions of this UDF lib.
Use FreeAdhocUDF insteas, google the net and you will find it. It is
compatible with FreeUDFLib AND cross platform.
If no try this UDF of FreeAdhocUDF to see if it works.

select
f_blobaspchar(a.MyBlobField, MaxLenghtToConvert),
...
from MyTable a

Where MaxLength is smaller then 32K and smaller then the length of the
returned string in the UDF definition (You can change this to the max of
32K)

Van den Wouwer Danny
Peopleware NV

MrT

unread,
Jun 3, 2006, 7:06:17 AM6/3/06
to
Hi:

Van den Wouwer Danny wrote:
>>
> How did you convert this blob to a varchar?

All I did was define the field as a String 8192 in the ttx file
instead of a Blob. Nothing else.

MrT

unread,
Jun 3, 2006, 10:05:17 AM6/3/06
to
Van den Wouwer Danny wrote:
> How did you convert this blob to a varchar?
>
> Using the f_blobaspchar of the FreeUDFLib?
> If yes, there are some errors in the blob functions of this UDF lib.
> Use FreeAdhocUDF insteas, google the net and you will find it. It is
> compatible with FreeUDFLib AND cross platform.
> If no try this UDF of FreeAdhocUDF to see if it works.
>
> select
> f_blobaspchar(a.MyBlobField, MaxLenghtToConvert),
> ...
> from MyTable a

Hi:

I downloaded the adhoc package, put the (win32) dll in the udf
folder with all the other UDF's and ran the sql to add the udf's.

When I try:

select f_blobaspchar(INVOICE_DETAIL, 8192)
from CRInvoice

I get error:

Error at line 1 - function F_BLOBASPCHAR could not be matched.

I went back and looked at the dll with dependancy walker and call looks
fine.

All looks fine but doesn't seem to want to work.

Van den Wouwer Danny

unread,
Jun 3, 2006, 10:38:06 AM6/3/06
to
You must tell your DB the name, module and describe the input and output
params:
There are 2 scripts in the FreeAdhocUDF package:

FreeAdhocUDF_declarations_all_dialect1.sql
and
FreeAdhocUDF_declarations_all_dialect3.sql

Depending on your dialect you must run one of these scripts and they
will define alle functions of the library.

Example:
DECLARE EXTERNAL FUNCTION F_BLOBASPCHAR
BLOB
RETURNS CSTRING(32760) FREE_IT
ENTRY_POINT 'blobaspchar' MODULE_NAME 'FreeAdhocUDF';


If you are running V7.xx and above put the .DLL in the UDF directory and
copy also the ib_util.dll into this directory (located in the bin
directory of interbase).

MrT

unread,
Jun 3, 2006, 11:34:15 AM6/3/06
to
Hi:

Van den Wouwer Danny wrote:

I did all that you describe. I did get it working. The function call was
wrong.

f_blbaspchar(INVOICE_DETAIL, 8192) must be

f_blbaspchar(INVOICE_DETAIL).

It wont accept the second parameter.


>>
> You must tell your DB the name, module and describe the input and output
> params:
> There are 2 scripts in the FreeAdhocUDF package:
>
> FreeAdhocUDF_declarations_all_dialect1.sql
> and
> FreeAdhocUDF_declarations_all_dialect3.sql
>
> Depending on your dialect you must run one of these scripts and they
> will define alle functions of the library.
>
> Example:
> DECLARE EXTERNAL FUNCTION F_BLOBASPCHAR
> BLOB

RThere is only one parameter to be supplied.

MrT

unread,
Jun 3, 2006, 12:21:28 PM6/3/06
to
MrT wrote:
> Hi:
>


Hi:

I got it working in app but it is still truncated just as it was
without the UDF using the ttx string definition only

When I execute the SQL in IBConsole, the entire string does not
appear and I can't tell if it is truncated there or in the Crystal
Reports field. It may be a limitation of IBConsole too???

I suspect a limitation in Crystal since both methods result in
truncation. I really don't know though, it could be ADO.

Also in the test gdb, there are no tables with blobs to test against.
Do you know what is it for?

MrT

unread,
Jun 3, 2006, 2:02:22 PM6/3/06
to
Hi:

Crystal has a 255 char limit on string fields in report, that is why
it is truncating. However, Crystal says you can use memo fields as long
as not in formula. Have not gotten there yet but progress (I guess).

Thanks.

0 new messages