I try to create PDF files from a WPTools 5 report. I use the following
code copied from the WPDF Manual.
Code
procedure TSmcCbsReporterFrame.ExportFromWPTools(Sender: TObject);
var
pdf: TWPPDFExport;
begin
pdf := TWPPDFExport.Create(nil);
WPDF_Start('\...\', '\...\');
pdf.Source := ReportRichText;
try
pdf.FileName := 'c:\wp5out.pdf';
pdf.Print;
finally
pdf.Free;
end;
end;
//
// -----------------------------------------------------------------------------
//
procedure TSmcCbsReporterFrame.CreatePDFClick(Sender: TObject);
var
pdfcreate: TWPCreatePDF;
begin
pdfcreate := TWPCreatePDF.Create(Self);
WPDF_Start('\...\', '\...\');
pdfcreate.EditBox := ReportRichText;
try
pdfcreate.ShowModal;
finally
pdfcreate.Free;
end;
end;
Alles anzeigen
But I still get the message that the licence code is missing and only 3
pages are created. I use an idependently bought WPDF 2 licence and
the value pair given for this licence. The created pages are OK, so the
problem is either the position of the WPDF_Start call or the licence
parameters.
Regards from Germany
Franz-Leo