procedure TForm18.Button1Click(Sender: TObject);
var
rutavalida:boolean;
ruta:string;
i:integer;
begin
rutavalida:=false;
begin
if edit1.Text <> ''
then
begin
if copy(destino.Path, length(destino.Path)-1 ,length(destino.Path)) = '\' then
ruta:= destino.Path + edit1.text
else
ruta:= destino.Path + '\' + edit1.text;
rutavalida:=true;
end
else
showmessage('Verifique Tipo de Archivo y Destino!');
edit2.Text:=ruta;
if fileexists(ruta)=true
then
showmessage ('VA A SOBREESCRIBIR SU ARCHIVO')
else
begin
if rutavalida
then
begin
IF RADIOGROUP1.ItemIndex=-1
THEN
SHOWMESSAGE('seleccione un Tipo de Archivo')
else
case radiogroup1.ItemIndex of
0:
begin
if edit1.Text<>''
then
begin
if Lblform.Caption='LA'
then
begin
form19.RvSys_aud.DefaultDest :=rdFile;
form19.RvProject1_aud.ProjectFile := ExtractFilePath( Application.ExeName ) + 'Listado_auditoria.rav';
form19.RvSys_aud.DoNativeOutput := false;
form19.RvSys_aud.RenderObject := form19.RvRenderPDF3;
form19.RvSys_aud.OutputFileName := ruta + '.pdf';
form19.RvSys_aud.SystemSetups := form19.RvSys_aud.SystemSetups - [ssAllowSetup];
form19.RvProject1_aud.Execute;
form19.RvProject1_aud.Close;
end;