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,295 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

911 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

21 Experts available now in Live!

Get 1:1 Help Now