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

mm conversion to screenpixels fails on A3

edited January 2002 in General
Hi,

A few weeks ago I mentioned the A3, mm -> screenpixels problem using RB
6.02

It's easy to demonstrate using the designer:
1. create a new report using MM units, and make it A3 (custom format
settings).
2. save the report
3. load the report and change the units to screenpixels...the report
dissapears from screen.

I think it has something to do with the introduction of ThousandsofMM in
combination with single-precision variable type.

=======================
In my application I have to set report.units := unScreenpixels to be sure
about the format in my source, and it fails on anything > A4, so I think you
meet a maximum-border there (max single number) !!
=======================

Could you please look into it and react on it, because it's very important
to me

Leon

Comments

  • edited January 2002
    What happened when you tried it with RB 6.03? I followed the steps you
    described, both at Delphi design time and in our runtime designer, but it
    worked correctly.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2002
    Jim,

    The A3 problem has been solved in RB 6.03 ( a big relief ).

    But now it's clear my printing problem has an extra dimension switching from
    RB 5 -> RB 6:

    I print large Metafiles to a TppImage. RB5 had a very good internal
    clipping, but from RB6 I get a white screen followed by a lot of white empty
    pages if a large amount of metafile-lines do not fit into the TppImage.

    So it depends on the complexity and the format of the metafile, sometimes
    giving a correct preview and sometimes giving a lot of empty pages.

    So perhaps you could delve into the metafile-clipping ?

    Tanks in advance,

    Leon





  • edited January 2002
    Jim,

    It has to do with memory-management. My kind of large metafile on A3 needs
    400 MB or more, so on some machines this does not work properly

    Leon
  • edited January 2002
    Jim,

    There is still one problem using A3 reports. The first time I get an empty
    print-preview. Closing the viewer and print again solves it.
    I manage to get around the problem by loading te report twice, by executing
    code TWICE:

    for i := 0 to 1 do
    begin
    ppreport1.template.filename := TheReport;
    ppreport1.template.loadfromfile;

    ppreport1.columnwidth := 100;
    reportSPperMM := 1000 * ppReport1.spcolumnwidth/ppreport1.MMcolumnwidth;

    ppreport1.units := utScreenPixels;
    end;


    Leon
  • edited January 2002
    That shouldn't be necessary. Sounds like the viewer component is in an
    incorrect state. Can you send an example project to
    support@digital-metaphors.com

    Have you tried calling any methods on the Viewer component? Open up
    ppViewr.pas in your installed RBuilder\Source directory to see what is
    available. You could try calling Viewer.Reset and then Viewer.FirstPage.
    Looking at the code, Viewer.RegenerateReport might do the trick since it
    sends a page request. Initialize is probably going to fail because of the
    exit at the top of the call.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.