Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
1,394 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

715 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