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

Regenerate report on using ps-printer driver

edited October 2002 in Devices
Hello,

I use Report Builder 7.

I am in the reportdesigner-printpreview and print. If I print
on a normal printer all is ok, but if I print on a postscript
printer the whole report is recalculated. That means even the
on create-event is called. That is bad, because i use this event
to get some userdata.

Additionaly when RB recalculates the report
variable-components in the report are only cleared.
They were recalculated, but not reassigned. And Memofelder,
which I manipulated in some events, are even resetted, but not
not reassigned.
So they shows not the data I want.

Than Report Builder generates the report
and stops the whole application, so that I have to end the
application task with the task manager.

The same thing happens in my own print preview.

In Report Builder 6, I have no problem with such things.

L. Schirmer

Comments

  • edited October 2002
    That was a bug in RB 6. The report should regenerate the report for the new
    printer. Eachprinter has its own printable area and possibly the pagination
    can be different depending on the fonts of the printer as well. You can set
    the Report.PrinterSetup to generate for the printer by default by setting
    the PrinterName property. Then you can set CachePages to true. By
    previewing all the pages in the report on the screen, the pages will be
    cached and then these same pages will be used to print on the printer
    without requiring the report to be regenerated. You can check if
    Report.PrinterDevice is non nil in your event handlers to determine if you
    are printing to the printer or not, as shown in the main report's demo #124.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    I tested the problem with your Example
    "...\Delphi6\RBuilder\Demos\0. RAP\3. Tutorials"
    with the report raTutor0007.rtm with
    the Report Builder Enterprise Edition 7.

    So I see it's not a problem with postscript printers, instead
    it is a problem with the standard printer.

    All prints fine if I print on my standard printer,
    but if I change in the printer dialog to another printer
    the report regenerates incomplete.
    The dbtext-components in the detailband shows only their names
    "orderno", "saledat", "amountpaid", but not their values.

    This happens with your demo.

    Regards

    Lothar Schirmer



  • edited October 2002
    This might be related to a bug that was fixed in the initial release of RB
    7. Did you download and install RB 7 dated 9/18/2002? You'll need this
    download and not the first release of RB 7 for Delphi 6. It fixes an issue
    that is related to the generation process.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.