Vincent
2006-12-05 13:25:13 UTC
When I excute my code, and tell it to print, it works fine. If I tell it to
make a PDF it also works fine, if I try to do both in the same loop, only
the PDF will work. Here is some code snipets...
While NOT(ReportClass.EOF) Do
Begin
ReportTable := ReportClass.GeneratePrintRecord;
RvProject.Open;
RvProject.SelectReport('SimpleReport',False);
RvProject.SetParam('CustomerName',ReportClass.AccountName + ' ('
+ReportClass.AccountNumber + ')');
RvProject.SetParam('HeaderKind','H1');
RvSystem1.DefaultDest := rdPrinter;
RvSystem1.DoNativeOutput := True;
RvSystem1.RenderObject := nil;
FileName := 'Reports\' + ReportClass.AccountName + '.pdf';
RvProject.Execute;//Print it
RvSystem1.DefaultDest := rdFile;
RvSystem1.DoNativeOutput := False;
RvSystem1.RenderObject := RvRenderPDF1;
RvSystem1.OutputFileName := FileName;
RvProject.Execute;//Make PDF
RvProject.Close;
ReportClass.Next;
SetLength(ReportTable,0);
End;
Any suggestions?
make a PDF it also works fine, if I try to do both in the same loop, only
the PDF will work. Here is some code snipets...
While NOT(ReportClass.EOF) Do
Begin
ReportTable := ReportClass.GeneratePrintRecord;
RvProject.Open;
RvProject.SelectReport('SimpleReport',False);
RvProject.SetParam('CustomerName',ReportClass.AccountName + ' ('
+ReportClass.AccountNumber + ')');
RvProject.SetParam('HeaderKind','H1');
RvSystem1.DefaultDest := rdPrinter;
RvSystem1.DoNativeOutput := True;
RvSystem1.RenderObject := nil;
FileName := 'Reports\' + ReportClass.AccountName + '.pdf';
RvProject.Execute;//Print it
RvSystem1.DefaultDest := rdFile;
RvSystem1.DoNativeOutput := False;
RvSystem1.RenderObject := RvRenderPDF1;
RvSystem1.OutputFileName := FileName;
RvProject.Execute;//Make PDF
RvProject.Close;
ReportClass.Next;
SetLength(ReportTable,0);
End;
Any suggestions?