Preview i Rave Report 5

Tags:    delphi

Hej

Jeg har nogle problemer med preview i Rave Report 5.
Når jeg trykker på knappen og ønsker et preview af dokumentet, får jeg ingen fejl. Lukker jeg derimod preview vinduet, og trykker på knappen igen for at få vinduet frem igen, får jeg en fejl (RvNDRWriter1 kan ikke oprette filen c:\\test.ndr fordi den bliver brugt af en anden enhed).


procedure TForm1.RvNDRWriter1Print(Sender: TObject);
begin
with sender as TBaseReport do
begin
print('Hello World');
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
RvNDRWriter1.Execute;
RvSystem1.Execute;
end;


###Unit1.dfm

object Form1: TForm1
Left = 192
Top = 114
Width = 696
Height = 480
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 304
Top = 200
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 0
OnClick = Button1Click
end
object RvNDRWriter1: TRvNDRWriter
StatusFormat = 'Printing page %p'
UnitsFactor = 1.000000000000000000
MarginLeft = 0.500000000000000000
MarginRight = 0.500000000000000000
MarginTop = 0.500000000000000000
MarginBottom = 0.500000000000000000
Title = 'Rave Report'
Orientation = poPortrait
ScaleX = 100.000000000000000000
ScaleY = 100.000000000000000000
FileName = 'c:\\test.ndr'
OnPrint = RvNDRWriter1Print
Left = 248
Top = 128
end
object RvSystem1: TRvSystem
TitleSetup = 'Output Options'
TitleStatus = 'Report Status'
TitlePreview = 'Report Preview'
SystemFiler.FileName = 'c:\\test.ndr'
SystemFiler.StatusFormat = 'Generating page %p'
SystemPreview.ZoomFactor = 100.000000000000000000
SystemPrinter.ScaleX = 100.000000000000000000
SystemPrinter.ScaleY = 100.000000000000000000
SystemPrinter.StatusFormat = 'Printing page %p'
SystemPrinter.Title = 'ReportPrinter Report'
SystemPrinter.UnitsFactor = 1.000000000000000000
Left = 288
Top = 128
end
end


Hvad er det jeg mangler eller gør forkert?



t