Hi.
I'm migrating from CTD151 to TD52.
I have a lot of reports that we get images from database and then we print in the reports.
It works fine with CTD151 but it fails using TD52. I have a "G" (I think Gupta) in the place I should have a picture.
In the TD52 sample I tried to fix the problem with no success reading "employee.photo" inside a binary variable and then using SalStrToMultiByte() and SalStrToWideChar().
Attached samples and shotscreens of both CTD151 and TD52 using island database.
I think the problem is the same as a recent topic posted here "BMP in Report Builder".
I need an urgent fix because we are rushing with the migrations and we have a lot of this reports.
Look forward to hear from you.
Thank you.
Report Builder fails to print images
Report Builder fails to print images
You do not have the required permissions to view the files attached to this post.
Re: Report Builder fails to print images
We're printing images in reports without problems. You're probably not reading the binary data from database correctly and they get corrupted.
Re: Report Builder fails to print images
Hi Milan.
Do you read into Long String and then use it as bind variable to the .QRP? It is what I do.
Is it possible you run my TD52 testcase using SQLBase's employee table?
I cannot understand why it works for you and not for me... I could not understand the way you work.
Thank you.
Do you read into Long String and then use it as bind variable to the .QRP? It is what I do.
Is it possible you run my TD52 testcase using SQLBase's employee table?
I cannot understand why it works for you and not for me... I could not understand the way you work.
Thank you.
Re: Report Builder fails to print images
You are fetching a LONG that's a binary value, so you need to call SqlSetLongBindDatatype() for that. And you need to make that call between the Prepare and the Execute. Note I do Prepare on SAM_ReportStart, and Execute on SAM_ReportFetchInit:
See help for SqlSetLongBindDatatype() and the different values for the 2nd parameter. Now the BMPs get fetched and displayed OK in your test case.
Code: Select all
On SAM_ReportStart
Return SqlPrepare( hSql,
'Select employee_id, photo
From employee
Into :sEmployee_ID, :lsPhoto' )
On SAM_ReportFetchInit
Call SqlSetLongBindDatatype( 2, 23 )
Return SqlExecute( hSql )
Who is online
Users browsing this forum: No registered users and 1 guest