Print Page | Close Window

Adding Pictures from the Hard Drive

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9641
Printed Date: 07 May 2024 at 6:43pm


Topic: Adding Pictures from the Hard Drive
Posted By: Enzyme80
Subject: Adding Pictures from the Hard Drive
Date Posted: 08 Apr 2010 at 7:15am
Using the built in Crystal Reports for VS 2005 I can open a report Click Crystal Report > Insert > Ole Object > and grab a bitmap from my hard drive.  This will then print on the report.  However, I cannot figure out how to do this by code.
 
I have a few bitmaps on my C drive.  Through code I want to select which one will print on the report. 
 
This is what I have so far. 
 
dim rptPicObj as pictureobject

rptPicObj = rpt.ReportDefinition.ReportObjects.Item("Picture1")

Now, I don't know if this is correct but this is how I access all of the fields on the report and can add information or text to them.
 
So I have C:\mySig.bmp and I want to put it to a picture on my crystal report any ideas - would perfect to not load it to a dataset.



Print Page | Close Window