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,319 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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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 perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

860 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