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

Previewform looks strange

edited December 2003 in End User
Hi

Sometimes when the previewform is coming up it looks a little bit strange:
on the left side the printer-symbol is missing and on the right side there
is a big panel with a size of 1/4 of the whole screesize. Is that a known
problem and what can i do?

Best regards
Robert

Delphi 7 and RB-Version: 7.02 Enterprise Edition

Comments

  • edited December 2003

    You can try updating to RB 7.03 and you can updating your video driver.

    I do not notice anything like that on my machine.

    Another option would be to replace the preview form with a custom version of
    our own. Most of the dialogs/forms in RB are replaceable (with the
    exception of the report designer and its toolwindows and toolbars).

    ------------------------------------------------------------
    Tech Tip: Replacing Built-in Dialogs/Forms in ReportBuilder
    ------------------------------------------------------------

    ReportBuilder has an open architecture for replacing any of the built-in
    dialogs. You can replace any of the built-in dialogs by creating a new form
    that inherits from an abstract ancestor and then registering it as the new
    built-in dialog.

    For example to replace ReportBuilder's preview dialog you could

    1. Create a new Preview dialog by renaming ReportBuilder's default preview
    dialog, then doing a SaveAs to save it under another unit name.

    The default dialog resides in RBuilder\Source\ppPrvDlg.pas and the form is
    called ppPreviewDialog. You should assign your form a unique name, for
    example, myPreviewDlg, and save the unit to another name. Also save the unit
    to the directory where your other forms are stored (not RBuilder\Source).

    2. Make desired changes.

    You will notice that the preview dialog inherits from an ancestor
    TppCustomPreviewDialog - this ancestor resides in ppForms.pas (where all the
    abstract ancestor forms for ReportBuilder are defined).

    3. Register the new form.

    Declare an initializtion section at the bottom of the unit:

    initialization

    ppRegisterForm(TppCustomPreviewer, TmyPreviewDlg);


    4. Add the new unit to your project and compile.

    Now your preview dialog should be automatically created and destroyed by
    ReportBuilder. The two page preview dialog in the
    RBuilder\Demos\Reports\Demo.dpro was created this same way. The only
    difference is the ppRegisterForm call is in then OnClick event of the
    button.




    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com




    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.