- Код: Выделить всё
frVariables['ИмяПеременной'] := 'Ваше значение'
и тогда отпадет необходимость в
Затем в отчете добавляем переменные в Файл -> Список переменных...
Модератор: Модераторы
frVariables['ИмяПеременной'] := 'Ваше значение'
Затем в отчете добавляем переменные в Файл -> Список переменных...
FTextFile.LoadFromFile( FileName );
frRpt := TfrReport.Create( Nil );
frRpt.Pages.Add();
Page := frRpt.Pages[ frRpt.Pages.Count - 1 ];
frView := frCreateObject( gtMemo, '' );
frView.SetBounds( FPrintRect.Left, FPrintRect.Top, FPrintRect.Right, FPrintRect.Bottom );
( frView as TfrMemoView ).Font := FFont;
Page.Objects.Add( frView );
Count := FTextFile.Count - 1;
for
idx := 0
to
Count
do
begin
if
FTextFile.Strings[idx] <> ''
then
frView.Memo.Add( FTextFile.Strings[idx] )
else
frView.Memo.Add( ' ' );
end;
frRpt.PrepareReport;
frRpt := TfrReport.Create( Nil );
frRpt.OnGetValue := frRptGetValue;
frRpt.DoublePass := True;
...
for
idx := 0
to
Count
do
begin
if
FTextFile.Strings[idx] <> ''
then
frView.Memo.Add
(
StringReplace
(
StringReplace
(
StringReplace
(
StringReplace
(
FTextFile.Strings[ idx ],
'[',
'#SBL#',
[ rfReplaceAll ]
),
']',
'#SBR#',
[ rfReplaceAll ]
),
'#SBL#',
'[SBL]',
[ rfReplaceAll ]
),
'#SBR#',
'[SBR]',
[ rfReplaceAll ]
)
)
else
frView.Memo.Add( ' ' );
end;
procedure TPrintStatement.frRptGetValue(const ParName: String; var ParValue: Variant);
begin
if
ParName = 'SBL'
then
ParValue := '[';
if
ParName = 'SBR'
then
ParValue := ']';
end;
- не работает, TOTALPAGES = 0.frRpt.DoublePass := True;
Printer.SetPrinter
Не понимаю откуда вы берете такие свойства и методы у Printer я там в упор не вижу их.
slyubez писал(а):Вы бы хоть на дату сообщений посмотрели.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 17