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

Export to metafile not producing correct output for BDS2006

edited May 2012 in General
Hello,
I'm looking at exporting reports to EMF. When I run your sample app
from the following url I get correct output using delphi XE but the
output is 'squashed' when using BDS2006. Is there some way to get the
correct output with delphi 2006 or is this a bug?

http://www.digital-metaphors.com:8080/Output/Image/Image_Device_Fundamentals

Regards,
Will.

Comments

  • edited May 2012
    Hi Will,

    Which version of Reportbuilder are you using? In my testing with Delphi
    2006 and RB 14.05, the exported EMF file is scaled correctly when
    running the example in the RBWiki article.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2012
    Nico,
    I'm using 14.05. On further investigation it seems this has nothing
    to do with delphi edition but something to do with the pc it's running
    on. I have delphi XE installed on windows 7, this works fine. I also
    have bds 2006 on an XP virtual machine hosted in virtualbox on the
    windows 7 pc. The XP VM produces squashed output using the binary from
    either delphi edition. Windows 7 produces the correct output from
    either delphi edition.

    Regards,
    Will.



  • edited May 2012
    Hi Will,

    We have not heard of this issue with exporting metafiles with Windows
    XP. How are you viewing the metafiles? Are you able to try on a
    separate XP machine rather than a virtual machine?

    Best Regards,

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



  • edited May 2012
    Can you send a simple project in .zip and the good and bad image results
    for m??


  • edited May 2012
    Hi Will,

    This is interesting. So the image is only incorrect when created on the
    virtual machine.

    ReportBuilder leverages Delphi's TMetafile object to create the metafile
    images of the pages and the size of the image is calculated inside the
    TppMetafileDevice.InitializeImage routine (ppImageDevice.pas).

    Perhaps you could trace into this routine on your Win 7 machine and your
    virtual XP machine and see if there is a difference in Width and Height
    values.

    Do you by chance have a default printer installed on your virtual
    machine? If so, what is the print resolution of the driver set to?

    Best Regards,

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