Solved

How do you link an image from a DBImage component in Delphi 2007 to a Bitmap component in Rave Reports?

Posted on 2008-06-10
1
1,286 Views
Last Modified: 2013-11-23
So, I have a database with a bit of information and an image for each entry.  I am trying to then print a Rave Report using that data.  All of the text fields are quite easy, but what I am having trouble with is displaying the image.  The bitmap component can be given an input property, but when I pass the picture on to the property that I declared previously, I get an incompatible data type error, as the property expects a string, not a TImage.

Basically, what I want is a line of code that looks like this

RvProject1.SetParam('Image', DBImage1.Picture);

but will actually work if I pass it a picture.  Or, some way of creating a parameter in Rave Reports that can be passed a picture.
0
Comment
Question by:roblad
1 Comment
 
LVL 13

Accepted Solution

by:
rfwoolf earned 500 total points
ID: 21754195
I think what you're getting confused with is setting a bitmap's image by passing a parameter into rave with the address of the bitmap on the server or pc.
You create a parameter in rave,
you create an OnBeforePrint event for the Bitmap component and say
"MyBitmap.FileLink := RaveProject.GetParam('pMyReportImage');" //pMyReportImage is the name of the parameter
You then compile.
Then before executing your report in Delphi, you say (almost as you have said)
RvProject1.SetParam('pMyReportImage', C:\MyImage.bmp);

===

But if your images exist in a database, why not just set the DataView and DataField properties of the bitmap component in Rave?
Obviously you'll need a dataview set up - which you'll need for normal text fields anyway
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now