Preview:
I received emails from a person call Paul. He told me that he is unable to open my project using Crystal Reports 10 so I decided to modified my previous project to load images in Crystal Reports 10 using Visual Basic 6 connected to MS Access 2000 and MS SQL Server 2000.
Updated 28 Nov 2009:
Common Mistake
If you have followed my Tutorial (page 19-29), you may find out that I have renamed the objects in the report using VB6. Unfortunately I may have created a confusion by renaming the default Fieldx to adoFileName. Some readers may interpret it as ado.FileName and hence replacing the code with the following line.
If .Item("ado.FileName").Value <> "" Then
Set bmp = LoadPicture(App.Path & "\Cake\" & .Item("ado.FileName").Value)
Set .Item("picCake").FormattedPicture = bmp
Else
Set .Item("picCake").FormattedPicture = LoadPicture("")
End If
Please do not follow the name when you hover the mouse pointer on the report design! Use the name shown in the VB IDE properties window.
i.e:
Wrong: .Item(“ado.FileName”).Value
Correct: .Item(“FileName”).Value
Related posts:
Load Images in Crystal Reports dynamically with Access 2000
Crystal Reports Tutorial Update
Download: Source Code (505KB)
The zip file contains MS Access 2000, MS SQL 2000 database backup, Crystal Report file, VB6 source code and some images.
Keywords: Visual Basic 6.0, VB6, ActiveX Data Object Control, ADO 2.8, Access 2000, SQL Server, password, print, Crystal Reports, 10.2, 10.5, CRAXDRT, CRAXDDRT, section, dynamic, images, load
I have received two emails recently on response to my tutorial at Planet Source Code.
Please refer to previous post on
Email 1:
hithank you for crystal report pdf file for load image into reporti need a pdf file or sample code vb for save and load blob field into database and reportthankali asad
First email was asking me on how to save and load BLOB field into database and display into Crystal Reports. I use a sample project to load BLOB data and then integtrate with my project to load image using crystal reports. Tadaa… it works! but the image dimension to save into the database must be same with the image dimension during the time the report is designed.
Download: Source Code
Email 2:
Thanks so much for your tutorial (attached).
I have some questions, if you’re willing ……
How to suppress the image if the image is the default?
If the image is suppressed, how to squeeze the section vertically to remove the space that the image would have taken up, but leave any detail that is in the section?
John Collett
The second email was asking me on how to suppress the default image or suppress the empty space if no image is loaded for a particular record. I use some tricks to suppress the section. I also attach some snapshots to show the method graphically.
Download: Source Code
Please remember to vote for me in planet source code, thanks!
http://www.planet-source-code.com/vb/scripts/showcode.asp?txtCodeId=70000&lngWid=1
Related posts:
Load Images in Crystal Reports dynamically with Access 2000
Load Dynamic Image in Crystal Reports 10 using Visual Basic 6
Beta version (21.0MB): Download Now
Features:
- Select Company
- Backup Database
- General Journal
- View Chart of Account
- View Chart of Template
- Maintain Template Group, Template, Menu
- Maintain Type, Head, Account, Ledger
- Master Lists Report
- General Journal List Report
- Trial Balance Report
- Balance Sheet Report
- Ledger Report

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void
Life
Earth « Default
Wind
Water
Fire
Light 