07 Nov 2009 @ 2:25 AM 

Preview:

CR10

Visual Basic 6 and Crystal Reports 10 reference

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

Posted By: Aeric
Last Edit: 28 Nov 2009 @ 02:04 AM

EmailPermalink
Tags


 

Responses to this post » (7 Total)

 
  1. […] post: Crystal Reports Tutorial Update Load Dynamic Image in Crystal Reports 10 using Visual Basic 6 […]

  2. Aeric says:

    I received a comment from someone recently but the comment has been removed due to server migration. Thank to the person commented on my blog. He said that my sample is not supporting BMP file. I test the sample again and don’t find the problem. My sample is supporting BMP, JPG and GIF files. File types which I tested not supported are PNG and TIF format.

  3. Anupam Das says:

    Hi Aeric,
    My problem with your code which is posted in http://www.planetsourcecode.com. If I am just viewing the report its ok but if I want to export the content to a .pdf then same image coming repeatedly.

    Please help me out.

    anupam

  4. Aeric says:

    Hi Anupam Das,

    Please be informed that the Crystal Reports that I am using, it is version 10.2 or 10.5. Your problem may occur due to different version of Crystal Report engine. Try remove the component or reference to the project and add in back with the version installed in your computer.

    Cheers.

  5. ahmed says:

    when i pool the fields and image to crystal report9 the fields are
    seen on crystal page but the image is not seen

  6. ahmed says:

    plz i pool the pictrue on crystal report9 page when i run the program the fields dispalyed but the image is hiden
    plz

  7. Aeric says:

    You may send me your code for review. btw, I don’t have Crystal Reports v9.

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


 Last 50 Posts
 Back
Change Theme...
  • Users » 2
  • Posts/Pages » 129
  • Comments » 195
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight