<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="Content-Style-Type" content="text/css"/>
</head>
<body>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Hi John</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">D2007 and Rave and PDF</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Here is a code snippet that sets up the execution of a Rave report to a PDF file.</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Here the filename is obtained from a save dialogue but can be set to any string value.</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">The lines that are related to the TRvSystem component (RvSystemFile) are marked *</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">           RvProject.Engine := RvSystemFile;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">           with RvSystemFile do</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">              begin</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">*             DefaultDest := rdFile;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">*             DoNativeOutput := False;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">*             RenderObject := RvRenderPDF;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">              with SaveDialog do</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 begin</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 FileName := mqReportsAvailable['ReportID'] + '.PDF';</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 InitialDir := fmMain.mqUsers['DataExportAndReportLocation'];</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 Filter := 'Acrobat Reader PDF File (*.PDF)';</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 DefaultExt := 'PDF';</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 end;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">              if SaveDialog.Execute then</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 begin</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">*                OutputFileName := SaveDialog.FileName;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 RvProject.ExecuteReport(mqReportsAvailable['RaveReportID']);</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">                 end;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">              end;</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Hope this helps.</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Graham Marsden</span></font></div>
</body>
</html>