Home Devices

Preview -> Print without data re-access

edited January 2012 in Devices
I see that choosing to print a report while in the previewer will re-access
the data and re-run the report itself. I was rather hoping it would just
print the cached pages. Is there a way to make it do the latter, so that
choosing to print from the preview page will just send those stored pages to
the printer? I don't want the report to change in any way from what is
shown in the preview.

Comments

  • edited January 2012
    Gah, wrong user name - sorry folks.

  • edited January 2012
    Hi Steve,

    Setting the Report.CachePages property to True should give you the
    effect you are after.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2012
    Ah, the extra wrinkle (which I didn't originally notice) - it only
    re-accesses the data when you switch printers. If you leave it set to the
    default printer, it doesn't.

  • edited February 2012
    Hi Steve,

    This is necessary due to the fact that different printers have different
    capabilities. If the report is initially generated using a printer only
    capable of 300 dpi, then you try to print to a printer capable of 2400
    dpi, the measurements and output will be incorrect.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2012
    Hi Nico,

    Is there any way to disable that behavior?

    The problem is, when it reruns, it's not behaving properly with some RAP
    code I have. Normally, the report will call a passthrough function in order
    to determine some constraints. However, it looks like the string being
    passed to the passthrough function has been set to the empty string, and the
    function isn't working correctly. If the report is printed without going to
    the preview screen first, it behaves correctly. And the preview correctly
    calls the function. But printing from the preview does not.

  • edited February 2012
    Hi Steve,

    You might consider printing to an archive file. This is a snapshot of a
    generated report in file format. You can use the TppArchiveReader the
    same way you would the report previewer only the pages are already
    generated and the output will be static.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.