Background Printing and Stream
Hi all.
Could you guys give an example on how to print a report to a pdf file and
then stream it back to the user? I would like to save the report design to
file , and when the user requests, load it and print to a pdf file and send
the web response with the pdf streamed. I'm working on a websnap
application with rb7.0 and Textradevices.
Thanks a lot.
Could you guys give an example on how to print a report to a pdf file and
then stream it back to the user? I would like to save the report design to
file , and when the user requests, load it and print to a pdf file and send
the web response with the pdf streamed. I'm working on a websnap
application with rb7.0 and Textradevices.
Thanks a lot.
This discussion has been closed.
Comments
--
Lynn, City of Sin. You never come out the way you went in...
how to print to a stream and send it back to the browser.
www.waler.com/download.htm
James Waler
Waler Ltd
http://www.waler.com
on the report? You are eligible for a free upgrade to the latest version if you
are interested.
James Waler
Waler Ltd
http://www.waler.com
Actually I use ReportBuilder 5.x and TExtraDevices 1.7, and I think those
demos have features not available for me. Do you think that I could just
print to a file (directly) and them assign the file to a TFileStream back to
the user? I tried that but nothing comes out and I don't get any errors
either.
Thanks.
Output : TFileStream;
begin
ppReport1.TextFileName := 'WebTest.pdf';
ppReport1.Print;
Output := TFileStream.Create('WebTest.pdf',fmOpenRead,fmShareDenyNone);
Output.Position := 0;
Response.Title := 'PDFOutput';
Response.ContentType :='application/pdf';
Response.CustomHeaders.Add('Content-Disposition=; ' +
'filename="YourPDFFile.pdf"');
Response.ContentStream := Output;
Response.SendResponse;
but now how do I load my "reportfile.rtm" file?