Hello,
for the fastreport's users.
We can define copies of the report with dinamic content using CopyName# variable, aditionaly I need to change some picture for every copy, did somebody make some thing like that?
thanks in advance
Marcelo V'ia
Hello,
for the fastreport's users.
We can define copies of the report with dinamic content using CopyName# variable, aditionaly I need to change some picture for every copy, did somebody make some thing like that?
thanks in advance
Marcelo V'ia
procedure Picture1OnBeforePrint(Sender: TfrxComponent);
begin
if callhbfunc('file',['.\sub\'+trim(<masterdata."imgid">)+'.jpg']) then
TfrxPictureView(page1.FindObject('picture1')).Picture.LoadFromFile('.\sub\'+trim(<masterdata."imgid">)+'.jpg')
else
TfrxPictureView(page1.FindObject('picture1')).Picture:=nil;
end;
begin
end .
2 .Page -- picture1 ---Event table --- onbforeprint
frxglobalvariables['copyname0'] := 'PREVIEW';
frxglobalvariables['copyname1'] := 'COPY1';
frxglobalvariables['copyname2'] := 'COPY2';
frxglobalvariables['copyname3'] := 'COPY3';
Otto,
thanks for the response, but the mentioned sample link a picture with a field in data source directly, it is not what I need
thanks any way
regards
Marcelo
Not if it is really what you need , but when I insert an image from a file, what I do is the following:
I have a file in the following path :
c:\image\picture1.jpg
in the report, i put a image control and in the event OnBeforePrint of de Page indicated the following:
Page1OnBeforePrint procedure (Sender : TfrxComponent ) ;
begin
 if length ( < Logo_Empresa > ) < > 0 then
     Picture1.LoadFromFile ( < Logo_Empresa > ) ;
 end;
<Logo_empresa> is a field that happened to the report containing the route , in this case :
C:\image\picture1.jpg
frxglobalvariables['copyname0'] := 'PREVIEW';
frxglobalvariables['copyname1'] := 'COPY1';
frxglobalvariables['copyname2'] := 'COPY2';
frxglobalvariables['copyname3'] := 'COPY3';ShumingWang wrote:1. code :
procedure Picture1OnBeforePrint(Sender: TfrxComponent);
begin
if callhbfunc('file',['.\sub\'+trim(<masterdata."imgid">)+'.jpg']) then
TfrxPictureView(page1.FindObject('picture1')).Picture.LoadFromFile('.\sub\'+trim(<masterdata."imgid">)+'.jpg')
else
TfrxPictureView(page1.FindObject('picture1')).Picture:=nil;
end;
begin
end .
2 .Page -- picture1 ---Event table --- onbforeprint