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,363 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

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…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month3 days, 11 hours left to enroll

630 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