Board index » delphi » [Newbie]Problem with a script in fast report

[Newbie]Problem with a script in fast report


2004-01-29 05:43:09 PM
delphi171
Hi,
In a regtangle object in the detail band of fast report, i use the
following script :
begin
memo.clear;
if [dsLignes."ZCL_RF_PRT"] = '**' then begin
if [dsLignes."ZCL_PRIX"] <>0 then begin
Memo.add([dsLignes."ZCL_PRIX"]) ;
Memo.Font.Style := fsBold ;
end ;
end else begin
Memo.add([dsLignes."TOTALLIGNE"]) ;
Memo.Font.Style := fsItalic ;
end ;
end
I obtain the good value in the object this way BUT :
1) I have lost the display format
2) The font style is not working. I don't have the object in bold or
italic
Can somebody help me ?
Tks
 
 

Re:[Newbie]Problem with a script in fast report

After a few tests, i found this :
1) To modify the style :
if [dsLignes."ZCL_RF_PRT"] = '**' then begin
if [dsLignes."ZCL_PRIX"] <>0 then begin
Memo17.Font.Style := [fsBold] ;
end else begin
Memo17.Font.Style := [fsItalic] ;
end ;
end else begin
Memo17.Font.Style := [ ] ;
end ;
where memo17 is the name of the control to modify
2) To make a control empty with a condition :
if [dsMaster."COM_TXREM1"] = 0 then begin
memo.clear ;
end;
where memo is a generic term.
3) After looking is the sources of fast report, we founsd there's no
way to modify the display format at the execution.
I don't thank Fast Report editor for the support :-(