 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Henrik Andersson Guest
|
Posted: Tue Feb 13, 2007 9:17 pm Post subject: Printing image in QuickReport |
|
|
Hi!
I have a QuickReport that may contain an image. In BeforePrint on a
childband I call the code below. However sometimes when I print from
preview, no images is printed. Any ideas why this could happen?
Using QuickReport 4.0.6 and Delphi 2006.
procedure TfrmRappBokSidaQR.VisaBild();
var
sBildfil, ImgFile, sFileExt: string;
sBildkatalog: string;
fRatio: real;
begin
if (qryRapp.FieldByName('ANT_PICTUREADDRESS').AsString <> '') then
begin
sBildkatalog := frmBok.pBildkatalog;
sBildfil := qryRapp.FieldValues['ANT_BILDADRESS'];
if FileExists(ImgFile) then
begin
try
QRImage1.Picture.LoadFromFile(ImgFile);
ChildBild.Height := 800;
if (QRImage1.Picture.Height > QRImage1.Height) or
(QRImage1.Picture.Width > QRImage1.Width) then
begin
if QRImage1.Picture.Height > QRImage1.Picture.Width then
begin
fRatio := QRImage1.Height / QRImage1.Picture.Height ;
QRImage1.Width := Floor(fRatio * QRImage1.Picture.Width);
end
else
begin
fRatio := QRImage1.Width / QRImage1.Picture.Width ;
QRImage1.Height := Floor(fRatio * QRImage1.Picture.Height);
end;
end;
qrMain.NewPage;
except
QRImage1.Picture := nil;
ChildBild.Height := 1;
end
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end; |
|
| Back to top |
|
 |
Jean-Francois Picard Guest
|
Posted: Wed Feb 14, 2007 12:07 am Post subject: Re: Printing image in QuickReport |
|
|
Hello.
There's no miracle to be done. We had the same problem with the logo of
our customers in reports. Sometimes it worked, sometimes not and we
didn't know why. We tried number of solutions but nothing worked. Except
one: TExcellentImagePrinter. It may sound like a pub, but after the
installation, (with a little hack of the TQRImage.Print) we got no more
complains.
Check this site: http://www.code4sale.com/joehecht/prndib.htm
JFPicard
Henrik Andersson wrote:
| Quote: | Hi!
I have a QuickReport that may contain an image. In BeforePrint on a
childband I call the code below. However sometimes when I print from
preview, no images is printed. Any ideas why this could happen?
Using QuickReport 4.0.6 and Delphi 2006. |
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Wed Feb 14, 2007 3:38 am Post subject: Re: Printing image in QuickReport |
|
|
Hi,
| Quote: | However sometimes when I print from preview, no images is printed. Any
ideas why this could happen? |
1. re-install the driver for printer
2. increase the graphic quality option in printer setting dialog (in Control
Panel)
--
With best regards, Mike Shkolnik
Scalabium Software
http://www.scalabium.com
mshkolnik (AT) scalabium (DOT) com |
|
| Back to top |
|
 |
Henrik Andersson Guest
|
Posted: Wed Feb 14, 2007 4:29 pm Post subject: Re: Printing image in QuickReport |
|
|
I tried that. The pictures prints, but in miniature size...
The strange thing is that I have two reports. One prints all "notes"
containing pictures the other print just one "note". The second report
prints just fine with the same picture.
Mike Shkolnik wrote:
| Quote: | Hi,
However sometimes when I print from preview, no images is printed. Any
ideas why this could happen?
1. re-install the driver for printer
2. increase the graphic quality option in printer setting dialog (in Control
Panel)
--
With best regards, Mike Shkolnik
Scalabium Software
http://www.scalabium.com
mshkolnik (AT) scalabium (DOT) com
|
|
|
| Back to top |
|
 |
Sylvain Lamothe Guest
|
Posted: Tue Feb 27, 2007 12:46 am Post subject: Re: Printing image in QuickReport |
|
|
It looks similar to the problem i've been working on last week.
Is the picture a Bitmap or jpg?
Henrik Andersson" <lhg.andersson (AT) gmail (DOT) com> wrote in message
news:45d1d689$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi!
I have a QuickReport that may contain an image. In BeforePrint on a
childband I call the code below. However sometimes when I print from
preview, no images is printed. Any ideas why this could happen?
Using QuickReport 4.0.6 and Delphi 2006.
procedure TfrmRappBokSidaQR.VisaBild();
var
sBildfil, ImgFile, sFileExt: string;
sBildkatalog: string;
fRatio: real;
begin
if (qryRapp.FieldByName('ANT_PICTUREADDRESS').AsString <> '') then
begin
sBildkatalog := frmBok.pBildkatalog;
sBildfil := qryRapp.FieldValues['ANT_BILDADRESS'];
if FileExists(ImgFile) then
begin
try
QRImage1.Picture.LoadFromFile(ImgFile);
ChildBild.Height := 800;
if (QRImage1.Picture.Height > QRImage1.Height) or
(QRImage1.Picture.Width > QRImage1.Width) then
begin
if QRImage1.Picture.Height > QRImage1.Picture.Width then
begin
fRatio := QRImage1.Height / QRImage1.Picture.Height ;
QRImage1.Width := Floor(fRatio * QRImage1.Picture.Width);
end
else
begin
fRatio := QRImage1.Width / QRImage1.Picture.Width ;
QRImage1.Height := Floor(fRatio * QRImage1.Picture.Height);
end;
end;
qrMain.NewPage;
except
QRImage1.Picture := nil;
ChildBild.Height := 1;
end
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end; |
|
|
| Back to top |
|
 |
Henrik Andersson Guest
|
Posted: Thu Mar 08, 2007 10:10 pm Post subject: Re: Printing image in QuickReport |
|
|
It's jpg.
Quickreport support gave me an update, but I don't think it have solved
my problem.
Sylvain Lamothe wrote:
| Quote: | It looks similar to the problem i've been working on last week.
Is the picture a Bitmap or jpg?
Henrik Andersson" <lhg.andersson (AT) gmail (DOT) com> wrote in message
news:45d1d689$1 (AT) newsgroups (DOT) borland.com...
Hi!
I have a QuickReport that may contain an image. In BeforePrint on a
childband I call the code below. However sometimes when I print from
preview, no images is printed. Any ideas why this could happen?
Using QuickReport 4.0.6 and Delphi 2006.
procedure TfrmRappBokSidaQR.VisaBild();
var
sBildfil, ImgFile, sFileExt: string;
sBildkatalog: string;
fRatio: real;
begin
if (qryRapp.FieldByName('ANT_PICTUREADDRESS').AsString <> '') then
begin
sBildkatalog := frmBok.pBildkatalog;
sBildfil := qryRapp.FieldValues['ANT_BILDADRESS'];
if FileExists(ImgFile) then
begin
try
QRImage1.Picture.LoadFromFile(ImgFile);
ChildBild.Height := 800;
if (QRImage1.Picture.Height > QRImage1.Height) or
(QRImage1.Picture.Width > QRImage1.Width) then
begin
if QRImage1.Picture.Height > QRImage1.Picture.Width then
begin
fRatio := QRImage1.Height / QRImage1.Picture.Height ;
QRImage1.Width := Floor(fRatio * QRImage1.Picture.Width);
end
else
begin
fRatio := QRImage1.Width / QRImage1.Picture.Width ;
QRImage1.Height := Floor(fRatio * QRImage1.Picture.Height);
end;
end;
qrMain.NewPage;
except
QRImage1.Picture := nil;
ChildBild.Height := 1;
end
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end;
|
|
|
| Back to top |
|
 |
Sylvain Lamothe Guest
|
Posted: Mon Mar 26, 2007 11:18 pm Post subject: Re: Printing image in QuickReport |
|
|
Is your image stretched? If yes I have a correction..
"Henrik Andersson" <lhg.andersson (AT) gmail (DOT) com> wrote in message
news:45f03560$1 (AT) newsgroups (DOT) borland.com...
| Quote: | It's jpg.
Quickreport support gave me an update, but I don't think it have solved
my problem.
Sylvain Lamothe wrote:
It looks similar to the problem i've been working on last week.
Is the picture a Bitmap or jpg?
Henrik Andersson" <lhg.andersson (AT) gmail (DOT) com> wrote in message
news:45d1d689$1 (AT) newsgroups (DOT) borland.com...
Hi!
I have a QuickReport that may contain an image. In BeforePrint on a
childband I call the code below. However sometimes when I print from
preview, no images is printed. Any ideas why this could happen?
Using QuickReport 4.0.6 and Delphi 2006.
procedure TfrmRappBokSidaQR.VisaBild();
var
sBildfil, ImgFile, sFileExt: string;
sBildkatalog: string;
fRatio: real;
begin
if (qryRapp.FieldByName('ANT_PICTUREADDRESS').AsString <> '') then
begin
sBildkatalog := frmBok.pBildkatalog;
sBildfil := qryRapp.FieldValues['ANT_BILDADRESS'];
if FileExists(ImgFile) then
begin
try
QRImage1.Picture.LoadFromFile(ImgFile);
ChildBild.Height := 800;
if (QRImage1.Picture.Height > QRImage1.Height) or
(QRImage1.Picture.Width > QRImage1.Width) then
begin
if QRImage1.Picture.Height > QRImage1.Picture.Width then
begin
fRatio := QRImage1.Height / QRImage1.Picture.Height ;
QRImage1.Width := Floor(fRatio * QRImage1.Picture.Width);
end
else
begin
fRatio := QRImage1.Width / QRImage1.Picture.Width ;
QRImage1.Height := Floor(fRatio * QRImage1.Picture.Height);
end;
end;
qrMain.NewPage;
except
QRImage1.Picture := nil;
ChildBild.Height := 1;
end
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end
else
begin
QRImage1.Picture := nil;
ChildBild.Height := 1;
end;
end;
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|