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

ReportBuilder & Gnostice eDocEngine: Unknown Graphics format

edited November 2009 in General
Hello,
not sure if that's the right place to post about the issue I have, but since
it's a combinations of ReportBuilder & Gnostice eDocEngine and since
Gnostice guys are around here too, I thought I would post it. Sorry if
that's not ok.

I'm trying eDocEngine out at the moment and the problem is, when I try to
export Reports, which contain images. No matter what export it is: PDF,
HTML, Text or so: once the report contains at least one image, I'm getting
an EUnsupportedGraphics exception with the content "Unknown Graphics
format".

I didn't find anything about it in the demos or on the web.

The demos either show how to do it manually, i.e. without to use the
ppReport or a report without images is being exported (which works in my
application either).

My code so far:

private
...
myDocSettings: TgtDocSettings;
...

----------------------------------

begin
myDocSettings.Preferences.ShowSetupDialog := false;
myDocSettings.Preferences.ProcessAfterEachPage := true;
myDocSettings.Preferences.UseImagesAsResources := false;
end;

----------------------------------

begin
if not assigned(RBExportInterface) then begin
RBExportInterface := TgtRBExportInterface.Create(nil);
end;
if not assigned(PDFEngine) then begin
PDFEngine := TgtPDFEngine.Create(nil);
end;

PDFEngine.Settings := myDocSettings;

PDFEngine.FileName := 'test.pdf';

RBExportInterface.Engine := PDFEngine;

RBExportInterface.RenderDocument(ppReportMain);
end;

----------------------------------

That doesn't work and I'm getting the mentioned exception.

The I additionally tried these options:

----------------------------------
PDFEngine.ImageSettings.OutputImageFormat := ifJPEG; // tried ifBMP as
well
PDFEngine.ImageSettings.IsFrame := True;
PDFEngine.ImageSettings.Stretch := True;
PDFEngine.ImageSettings.KeepAspectRatio := True;
----------------------------------

But it doesn't help.

I don't know what the problem is. Is it RB or is it eDocEngine or both.

Am I doing anything wrong? Is there missing anything?

Would be great, if you could help me.

Regards,
Mark

Comments

  • edited November 2009
    Hello Mark,

    Do you have any third-party image libraries that register themselves into
    your VCL environment? This could be the reason. If it is the case, we'll
    need to register the image library with eDocEngine. Let us know which image
    library you are using.

    Could you send us the .RAF file of the report you are trying to convert, so
    we can check that out as well.

    Thanks,

    --
    Girish Patil
    Gnostice Information Technologies
    --------------------------------------------------------
    PDF and document processing tools for VCL, .NET and Java
    http://www.gnostice.com

  • edited November 2009
    Hello Girish,

    thanks for your reply.

    We are using Envision Image Library 2.54 and DevExpress is registering
    TdxPNGImage as well.

    Envision is probably the troublemaker, since it seems to "override" the
    dxPNG-format in some way, so even without using anything from Envision
    components in a unit, their unit EnPngGr gets added to the uses-clause, once
    I want to use a cxImage from DevExpress. Because of that the cxImage
    doesn't work properly anymore, i.e. is not transparent etc.

    As for the .RAF file:
    does it work with .RAF files only? I'm not using one. I have a ppReport and
    load the template into it.
    The template contains an offset, so you wouldn't be able to open it or I
    would remove it if needed.
    But actually the report doesn't contain anything special. It's a new report
    with 2-3 labels and 1 ppImage, where I load one of the Windows's example
    pictures from the default picture folder, that is it. Once an Image is
    included, the error accours.

    Hope that helps you.
    Please let me know, if you need more information.

    Mark


  • edited November 2009
    Hi Mark,

  • edited November 2009
    Hi Mark,

    After getting the information from you of the Delphi/RB version you were
    using, we immediately sent you the new binaries by email. I wonder if you
    got it.

    Please confirm.

    Thanks,

    --
    Girish Patil
    Gnostice Information Technologies
    --------------------------------------------------------
    PDF and document processing tools for VCL, .NET and Java
    http://www.gnostice.com

  • edited November 2009
    Hello Girish,

    I did implement the new binaries you sent me and with the changes you made
    there the problem is solved and it works fine now.

    Thank you very much for your help and great support!

    Mark


This discussion has been closed.