on 05-17-2016 11:41 AM
I'm using MS SQL Server 2014 and Crystal Reports 2013.
The report prints BLOB data field (.jpg) when it runs from Crystal Reports Designer Preview (Screenshot 1), but the fields are blank when the report is printed from the Crystal Reports Viewer. Please note that the only BLOB fields are blank other data fields are working properly.
Please help.
Screenshot 1:
Screenshot 2:
Did you write an application using our .NET SDK packages?
Or are you using the Crystal Reports Viewer product itself?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See this post, the end of it, it's a long one...
There is a a line to add to the code that will fix this...
// Open a report and get and fill in the various info boxes | |
private void btnOpenReport_Click(object sender, System.EventArgs e) | |
{ | |
// from Soda to handle Viewer OLE Object refresh issue 175343 | |
crystalReportViewer1.CachedPageNumberPerDoc = 1; |
Don
Thanks Don for the detail answer,
Is it possible to set this flag without touching the application? For example: using Windows Registry to set this flag ON by default.
It is a third party application and its update is out of the scope.
FYI,
I've developed a sample application myself for the testing purposes, which prints the same report . I've also added the line "crystalReportViewer1.CachedPageNumberPerDoc = 1" you have suggested for the fix, but I have no success. The BLOB fields are still blank.
Any idea?
Search for KBA 2163438, it includes a Printer app that you can test with.
See if setting the Viewers Print button to use POC, it's the same Dialog box CR designer uses and may fix this.
And no there is no registry or command line option to enable that feature.
Are the JPG's static or loaded from a database?
Don
I'll check the KBA and share the results later.
But, what I found during my research today is:
the report under the question is printing poperly if I use OLEDB Provider for SQL Server. Anyway the application requires the ODBC connection only.
My assumption is something goes wrong with Crystal Reports .NET SDK if the report is created using ODBC Crystal Reports driver.
The DSN is creted with MS SQL Server Native Client 11.0.
JPG is loaded from the database (varbinary(MAX)).
Hi Don,
Please find the results of KBA 2163438 in the screenshots below:
Screenshot 1: Report1.rpt created using ODBC connection and DB driver shows crdb_odbc.dll file with major version 13.0, which means that it part of Crystal Reports .NET SDK package.
Screenshot 2: Report2.rpt created using OLEDB connection and DB driver shows crdb_ado.dll, which also is a part of Crystal Reports .NET SDK package.
Please note that the both reports are successfully printed from Crystal Reports 2013 Designer preview either with ODBC or OELDB. The driver files mentioned above (crdb_odbc.dll and crdb_ado.dll) are placed on the different place for Crystal Reports 2013 and the major version for them is 14.1. That is why I'm referring to the Crystal Reports .NET SDK fix rather than issue with ODBC connection.
I'll also develop a sample application which shows an image from database without using CR, and let you know the results.
Thanks in advance.
Thank you for testing...
It definitely looks to be an issue in the ODBC driver. I've never seen this happen before though.
Is it possible for you to zip up the MDF and LDF files that hold those images so I can test here also and if required I would need to send the dB to DEV to look into also?
Make a copy of the DB and remove all the table not needed and any private info, Or export that table into a new DB/table and send just it, with an ID field also so I can get other data with the field.
If you can I'll send you a link to upload it to...
Just thought of something else to try, open the report and click on File, Report Options.. and check on this option:
Don
Hi Gevorg,
Here's the link:
https://mdocs.sap.com/mcm/public/v1/open?shr=WmVvx9jUB4ZROBwyBEaMKtJ5NO_8Bpix8NQi73nCJ-k
Thanks again
Don
The printer is Canon LBP6670 Class Driver You can find it on the top-left corner of the screenshot I've provided earlier.
Could you tell me what is the number of the CR .NET SDK support pack you have installed on your test PC?
I'm testing on the Windows 10 x86 System, does it make sense?
Could you please attach the screeshot of your test too?
Thanks
Hi Don,
It would be more helpful if we can arrange a TeamViewer remote session to connect to my test PC. I will reproduce the issue during the remote session so that we can try to solve it.
I've also created a new test PC with Windows 7 x64 system, that have only CR runtime version 13.0.16.1954 (the latest one) installed on that PC, but I've got the same result (a blank image with ODBC).
Please let me know if my suggestion with the remote session is applicable for you.
Thanks in advance
Sorry, this is not a support system that allows direct access. If you want to connect you'll have to purchase a single case or if you have a support contract create one in SMP.
Yesterday I did a quick test just before leaving for the day, now that I have done more testing I can duplicate the problem....
I don't get the images if I remove the saved data with the report and set log on and parameter value at runtime either, so it's not a printer problem.
Seems the routine in the crdb_odbc has a problem with the amount or data type when using JPG's.
Also has nothing to do with the option for caching either.
I'll have to send this off to DEV to see if there is some registry key that might fix this or if they need to do a fix..
I'll update the post once I get the case created.
Don
Incident 152017 / 2016 / Accessing JPG from SQL server fails for ODBC - OLE DB works
KBA - 2322297 - Accessing JPG through Stored Procedure from MS SQL Server 2014 fails to show images using ODBC, OLE DB works.
Done, info updated above....
Interesting way you wrote the SP to collect the image files into the buffer.... May have something to do with it. But I don't use SQL this way so not sure if that is the way it should be done.
Once R&D has a look at tit they can determine the cause how to fix it.
If it's a Registry fix I'll update the post, if it needs code fix it will be released in SP 18.
Thanks again
Don
I have the same issue with Crystal Report 2020. TIF images are showing as a white square blob field. However, images are showing perfectly in Version 10. Images are saved in SQL server database. Can you please assist?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.