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

Printing to File question

edited August 2002 in General
Hi;

Three questions:

a) I have a report that prints quote for the user. This report has logo
and lines on it to make it look professional. How can I print to a file
a duplicate image of the same report that shows up on the printer?

b) Is it possible to print to file *WHILE* it's printing to the printer?
Rather than invoking the printing process twice?

c) I would like to store an image of that quote inside of a BLOB field.
Where can I get info how to write to BLOB and more importantly, how to
read it back and print it to screen or printer?

Thank you in advance!
--
Best Regards;
Ben Hayat
Micro Intelligence Corp.
MicNet@Ix.Netcom.Com

Comments

  • edited August 2002
    a. Render the report to PDF. Check out the waler (www.waler.com) and
    pragnaan (www.pragnaan.com) devices for PDF ouput.

    b. No. They are completely different processes. You can set CachePages to
    true the first time you generate the report which will speed up the second
    generation.

    c. Render the report to an archive and store the archive in the DB (your
    other alternatives are rendering to one of the formats supported by the
    above mentioned devices, i.e. PDF, images, etc.). For information on reading
    a BLOB from a database look up TBlobField and TBlobStream in Delphi help. RB
    6.5 will ship with a DBReader component which will allow you to do this
    directly.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited August 2002
    thank you Alexander;

    --
    Best Regards;
    Ben Hayat
    Micro Intelligence Corp.
    MicNet@Ix.Netcom.Com
  • edited August 2002
    For question b)

    Yes, you can print to a file while printing to a printer. Take a look at
    demo 122 which shows how to print to two printers simultaneously. Instead
    of creating a second printer device, create your TppTextFileDevice or
    TppReportTextFileDevice (or any other device) and assign it to the reports
    publisher. Note that you MUST use PrintToDevices and remember to free these
    devices at the end. This method will server each page to each device as
    they are created all within a single pass. We use this heavily in our
    software.

    Let me know if you have any other questions on how to do this.

    Chuck Van Acker
    Alogent Corp.
  • edited August 2002
    You're correct Chuck. Not sure what I was thinking when I answered that one.
    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.