Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

How to batch export report for each row in a dataset?

edited September 2010 in General
Hi,

I have a dataset with several rows. I wish to export a PDF file for
each row (e.g.: one row one pdf file).

How am I going to do that with ReportBuilder? The following is my
attempt and it doesn't work:

begin
ppDBPipeline1.RangeBegin := rbCurrentRecord;
ppDBPipeline1.RangeEnd := reCount;
ppDBPipeline1.RangeEndCount := 1;

ppDBPipeline1.First;
while not ppDBPipeline1.EOF do begin
D := TppPDFDevice.Create(nil);
try
D.FileName := 'Random-generated-file.pdf';
D.Publisher := ppReport1.Publisher;
ppReport1.PrintToDevices;
finally
D.Free;
end;
ppDBPipeline1.Next;
end;
end;


The above loop only traverse once only.


--
Best regards,
Chau Chee Yang

E Stream Software Sdn Bhd
URL: www.sql.com.my
SQL Financial Accounting

Comments

This discussion has been closed.