How can I display JPEG Image in Rave Report?

Hi Guys,

I am currently using Delphi 2005 developing a project in VCL Form Application - Delphi for Win32. therefore I intend to use Rave Report for generating reports.
I have this situation:
    - Extracting Jpeg images (Blob field) from db (Interbase 7.1) to generate reports using rave reporting tool. But found that its only support Bitmap images.

So, how should I go about to get the jpeg images shown on Rave Report?
Please advice. Thanks.


Regards,
Eric
0
Eric
12/5/2009 2:25:26 AM
embarcadero.delphi.reporting 487 articles. 0 followers. Follow

2 Replies
2635 Views

Similar Articles

[PageSpeed] 10

> {quote:title=Eric Kho wrote:}{quote}
> Hi Guys,
> 
> I am currently using Delphi 2005 developing a project in VCL Form Application - Delphi for Win32. therefore I intend to use Rave Report for generating reports.
> I have this situation:
>     - Extracting Jpeg images (Blob field) from db (Interbase 7.1) to generate reports using rave reporting tool. But found that its only support Bitmap images.
> 
> So, how should I go about to get the jpeg images shown on Rave Report?
> Please advice. Thanks.
> 
> 
> Regards,
> Eric

Put this code in the OnDecodeImage event

procedure TCCoCHForm.ReportSystem1DecodeImage(Sender: TObject;
  ImageStream: TStream; ImageType: String; Bitmap: TBitmap);
var
  Image: TJPEGImage;
begin
  if ImageType = 'JPG' then
  begin
    Image := TJPEGImage.Create;
    try
      Image.LoadFromStream(ImageStream);
      Image.DIBNeeded;
      BitMap.Assign(Image);
    finally
      Image.Free;
    end;
  end;
end;

You must also put JPEG in the uses clause. Here is the code I use to pring the jpeg...

          if PhotoTable.FindKey([TK]) then
          begin
            if (WhichDir = 'C') or (WhichDir = 'E') or (WhichDir = 'A') then
              GraphicPath := DirectoryPicLoc + '\' +
                             PhotoTable.FieldByName('PicName').asString +
                             '.jpg'
            else
              GraphicPath := DirectoryPicLoc + '\' +
                             PhotoTable.FieldByName('PicName').asString +
                             'Family.jpg';
            if FileExists(GraphicPath) then
            begin
              Stream := TMemoryStream.Create;
              Image := TJPEGImage.Create;
              try
                Image.LoadFromFile(GraphicPath);
                Image.SaveToStream(Stream);
                Stream.Position := 0;
                GX := 1.62;
                gXPosNPR := gXPosNP+2.25;
                PrintImageRect(gXPosNP,gYPosP,gXPosNPR,gYPosP+GX,
                               Stream,'JPG');
              finally
                Image.Free;
                Stream.Free
              end;
            end

Define Image as Image: TJPEGImage;

Hope that helps.

George
0
George
12/7/2009 3:02:14 AM
Hi George,

Thanks for the advise. ;)


Best Regards,
Eric


> {quote:title=George Winkler wrote:}{quote}
> > {quote:title=Eric Kho wrote:}{quote}
> > Hi Guys,
> > 
> > I am currently using Delphi 2005 developing a project in VCL Form Application - Delphi for Win32. therefore I intend to use Rave Report for generating reports.
> > I have this situation:
> >     - Extracting Jpeg images (Blob field) from db (Interbase 7.1) to generate reports using rave reporting tool. But found that its only support Bitmap images.
> > 
> > So, how should I go about to get the jpeg images shown on Rave Report?
> > Please advice. Thanks.
> > 
> > 
> > Regards,
> > Eric
> 
> Put this code in the OnDecodeImage event
> 
> procedure TCCoCHForm.ReportSystem1DecodeImage(Sender: TObject;
>   ImageStream: TStream; ImageType: String; Bitmap: TBitmap);
> var
>   Image: TJPEGImage;
> begin
>   if ImageType = 'JPG' then
>   begin
>     Image := TJPEGImage.Create;
>     try
>       Image.LoadFromStream(ImageStream);
>       Image.DIBNeeded;
>       BitMap.Assign(Image);
>     finally
>       Image.Free;
>     end;
>   end;
> end;
> 
> You must also put JPEG in the uses clause. Here is the code I use to pring the jpeg...
> 
>           if PhotoTable.FindKey([TK]) then
>           begin
>             if (WhichDir = 'C') or (WhichDir = 'E') or (WhichDir = 'A') then
>               GraphicPath := DirectoryPicLoc + '\' +
>                              PhotoTable.FieldByName('PicName').asString +
>                              '.jpg'
>             else
>               GraphicPath := DirectoryPicLoc + '\' +
>                              PhotoTable.FieldByName('PicName').asString +
>                              'Family.jpg';
>             if FileExists(GraphicPath) then
>             begin
>               Stream := TMemoryStream.Create;
>               Image := TJPEGImage.Create;
>               try
>                 Image.LoadFromFile(GraphicPath);
>                 Image.SaveToStream(Stream);
>                 Stream.Position := 0;
>                 GX := 1.62;
>                 gXPosNPR := gXPosNP+2.25;
>                 PrintImageRect(gXPosNP,gYPosP,gXPosNPR,gYPosP+GX,
>                                Stream,'JPG');
>               finally
>                 Image.Free;
>                 Stream.Free
>               end;
>             end
> 
> Define Image as Image: TJPEGImage;
> 
> Hope that helps.
> 
> George
0
coiner
12/9/2009 12:38:29 AM
Reply:

Similar Artilces:

How can I cahnge the report header before i load the report into the report viewer?
That is basically it... Thanx in advance What are you trying to change? The report title, the items in the header, etc... Basically, in CR.NET you can't add new objects to the report during runtime. However, you can modify existing objects by setting a reference to them and then changing the properties. I have ample source code in my free ebook that teaches you how to modify the different properties of each report object. www.CrystalReportsBook.com?cpgn=asp.net HTH, Brian Bischof Brian Bischof www.CrystalReportsBook.com ...

display reporting services report in report viewer in remote mode
Hi  I have some problem in displaying a report done through reporting services in asp.net 2.0 report viewer server control for remote processing mode.I have created a Reporting Services project through Business Intelligence Development Studio and another Web application project in VS 2005. I have take a Report Viewer control on a form to view report created in the reporting services project. I have set the Processing mode of Report Viewer to Remote, have set ReportServerURL to "http://localhost/ReportServer" and Report Path as the "/(Reporting service proje...

Displaying Loading Image Over The Crystal Report + Changing Report PageOrientation At The Time Of Print
 Hi, I Want To Put an Animated GIF Image Over The Crystal Report Means At The Center Of The Report When The Report is Loading And That I have To Do In Asp.Net 2.0 I Saw Matt Berth Ajax Article The Dynamic Loading Image Over The GridView But That Not Working. Plz Help Me With That. And I Have 1 More Question I Have Set The  I Have The Set The Page Orientation Of Report Document To LandScape in Code Behind Of My Asp.net Page But When At The Time Of Print I Want That The Report Should Print in Portrait Mode So Give Me Something That I Can Get Help. Show Me Some Sample Code ...

Fast Report or Rave Report?
Hello, i just started to use Delphi XE2. Now i want to start to print some reports from within a Delphi application. While looking at the help i saw that there are to report tools. Fast Report and Rave Report. Which one should i use? Which is more commonly used, newer, better or preferably used? Which one is easier to deploy. > {quote:title=Magnus Mueller wrote:}{quote} > > While looking at the help i saw that there are to report tools. Fast Report and Rave Report. > > Which one should i use? Which is more commonly used, newer, better or preferably used? >...

How can I make a report with "Chart" on it by using "Rave Report"?
Dear All: How can I make a report with "Chart" on it by using "Rave Report"? Just like we did with "TQRChart" in "QuickReport". Thanks, Michael ...

about report reports generation and emailing reports
hi i am a bit new to Bugzilla, i am using 2.18rc3version. and i am facing two problems with report generation. 1) the checksetup.pl shows all the perl modules includig optional perl modules to be installed and available including thse required for graphical report generation. but despite this i am able to get tabular reports generated but when i click for line/bar reports of the same tabular report the next page does not show the required pie/bar reports. 2) is there any facility for sending these generated reports to the client via email through Bugzilla? kindly help. regards...

"Load Report Failed."
Hi Everyone, I have developed a report in VS2005 (On a Vista PC, in case that's relevant). In the report designer, I switch to "Main Report Preview" and the report shows up fine - it get the data from the database and displays perfectly. I tried to add a page to display the report in my app.  I added a crystal report viewer and a Crystal Report Source.  The report displays fine in design view.  However, when I run the app, all I get is "Load Report Failed". Please see the code below:<%@ Page Language="C#" M...

Crystal Reports Image box does not display images.
i have CR report which has a Imagebox to display images from db table. i am storing the images in a table as path. in my dev machine when i load the .aspx page with the crystal report it shows the image in the box but when i run it from the web server the image does not show. even from the .rpt file i get the image and all data. anyone know how can i get this working? the images are stored in a mapped network drive. -------------------------Anything is possible. If Post.Solved.Problem Then " Mark As Answer "End If i create a CR 10 report with Vista OS with Asp.net in my ...

Converting Crystal Reports 9 report to Crystal Reports .NET report
I have a web page that is supposed to display a crystal report.  The report is fully written and functional in crystal 9 (non-.Net)  .  Is there a way to convert my .rpt so that I can just include it in the new web site? why you don't try to compile project with .net and include your report. then if crystal report is power tool will suggests you with conversation tool    My blog is here.Please remember to 'Mark as Answer' if this post answered your question! Wow it really was that easy!  I just added the old crystal report into my .NET proj...

ANN: Delphi HTML Reports preview
Very simple to use - buid complex reports in 10 minutes. All you need to know - SQL, HTML, CSS. Use all power of HTML4 and CSS3 in any part of report. Features: Barcodes Multiline headers Groups Cross-tabs (any level) Transformations (cross-tab with range) Pictures (+from database) Master/Detail (any level) Supports all databases and db-libraries (writing adapter for any db-acess library takes only 5 minutes) Standalone reports - no need for delphi forms/datasets. 100% native Delhi code. All Delphi versions - from Delphi 6 to XE6 (VCL). 32/64 bit. Supports Unicode for...

Does anyone know if we can save the Graphical report or tabular report after I set some value and generate the data for the report?
This is a multi-part message in MIME format. ------_=_NextPart_001_01C5D448.521BE5D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =20 Does anyone know if we can save the Graphical report or tabular report after I set some value and generate the data for the report?=20 =20 =20 Thanks, Kevin ------_=_NextPart_001_01C5D448.521BE5D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =...

Report Control (report viewer and report designer)
Hi there! ive looked over the forums and other websites that you referred but i dont have any luck for reports. i created a page that has simple data-entry, aside from that, i do want to have a printable report on what are the items i have added this day. i am using a report designer (rdlc) and a report viewer, which is in a aspx page. ive explored how it works for a simple select statement but i want to know how it will work for parameter passing. a referral for a tutorial website for the report viewer and report designer is very much appreciated. or if you want to share your...

Are there other reporting tools other than reporting services and crystal reports
Has anyone had any experience with any reporting tools other than Reporting services and Crystal reports? If so, is there one that you would strongly recommend? Or, are these two the top choice on the market for report generation from .NET? I have heard some moaning and groaning about reporting services. Specifically in regards to the amount of time needed to design a report. Crystal reports seems kind of difficult to me, as I don't have any training with it. Basically I am looking for a reporting tool that is easy to use, and can be used from .NET....

Report with nested report always displaying in Preview
Hi, PB 6.5 Build #444 Windows2000 I have a datawindow (a report) that displays some data in the detail band as well as the group1 header and trailer bands. I have placed a nested report (in the summary band) on the report as well. When I run the report, at both dev time and run time, the report is displayed in Preview mode. I attempt to turn it off via script (dw_report.Modify("DataWindow.print.preview = No")) but it didn't work. Has anyone encounter this? If so, how do I get around this? Thanks in advance. - Andy AFAIK, you can't - composite...

Web resources about - How can I display JPEG Image in Rave Report? - embarcadero.delphi.reporting

Samples of display typefaces - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

RIP Flash: Google display ads will be all HTML5 by January 2017
Google announced on its AdWords G+ profile today that its display ads will soon be 100% HTML5. From June 30th this year, display ads built using ...

Poll: Should future iPhones offer always-on or Watch-style motion-activated displays?
No, it’s not as dumb a question as it seems. While keeping the full iPhone display on full-time would quickly drain the battery, there are ways ...

HTC One M10 reportedly will feature a 5.2-inch display
... size, until now. Samsung Galaxy S7 rumor roundup LG G5 rumor roundup Initial rumors suggested we were looking at a larger 5.1-inch QHD display ...

Google display ads going all-HTML, will ban Flash in 2017
On the Adwords Google+ page , Google just announced a timeline for banishing Flash from its advertising network, announcing that "Google Display ...

Confirmed: LG G5 will have an always on display
LG really can’t wait to launch the LG G5 already. The company confirmed a few days ago in a tweet that the handset will be unveiled on February ...

Google just set in stone a timeline to ban Adobe Flash from its display adverts
Google just laid out a timeline to get rid of Adobe Flash from its display advertising services. From January 2, 2017 ads in the Flash format ...

The whiteboards of tomorrow: 3 interactive displays
Meetings are made more productive by digital 'whiteboards' that you can write on and interact with. We review three new displays by InFocus, ...

The whiteboards of tomorrow: 3 interactive displays
A company meeting is more than just one person talking to a group. It can also include PowerPoint presentations, videos and, very often, a whiteboard ...

LG G5 Will Have an Always-On Display
... to make the G5 standout? Outside of the phone’s dual cameras and premium build, it looks they are also planning to give it an always-on display. ...

Resources last updated: 2/11/2016 12:38:43 AM