combatvc
Jan 15 2006, 04:26 PM
Hello my friend,s:
I have a problem with the OnBeforerint event of frxReport
In old version (2.x) OnBeforerint event has this code:
| CODE |
procedure TForm1.frReport1BeforePrint(Memo: TStringList; View: TfrView); begin end;
|
so, I have this code to assign a bmp picture for assing this to runtime, because the logo is aved in a Ini file to Delphi application:
| CODE |
procedure TForm1.frReport1BeforePrint(Memo: TStringList; View: TfrView); begin If View.Name = 'Picture1' then TfrPictureView(View).Picture.LoadFromFile(tLogoFile);
end;
|
where tLogoFile is a string with the path and name of de bmp
my surprise is that in FastReport 3, the new code for this event is:
| CODE |
procedure TfColores.frxCatalogoColoresBeforePrint( Sender: TfrxReportComponent); begin end;
|
what is the solution for this?
another method???
so, I write code with LoadFromFile in scrip report, but I do not work, because I think that this procedure no correct in FR3; always not work for example de variable that pass with [variable] not work whits this
Excuse me for my bad english
Best regards: Julio from Spain
-=Den=-
Jan 16 2006, 04:42 AM
[CODE]
procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
begin
if Sender is TfrxPictureView then
TfrxPictureView(Sender).Picture.LoadFromFile(tLogoFile);
end;
mflopes
Aug 31 2009, 03:15 PM
why does my delphi dosenīt acept
procedure TTermografia.MainReportBeforePrint(Sender: TfrxReportComponent);
begin
if
sender.name := 'Picture5' then
tfrxpictureview(sender).picture.loadfromfile('path&filename');
end;
E2012 Type of expression must be BOOLEAN
Thanks
gordk
Sep 1 2009, 04:39 AM
it is exactly what delphi is telling you.
if
sender.name := 'Picture5' then
this is not boolean
this is
if
sender.name = 'Picture5' then