Home Devices

TExtra component alternative during Delphi and RB upgrade

We are evaluating whether to upgrade our existing delphi environment from D2006 to Delphi Tokyo. As part of it, I understand we will also need to upgrade the RB.

The old code is using the TExtra component (By Waler) to export out in diff formats. Since it's not available/upgradable to Delphi Tokyo, I was wondering if upgrading RB will achieve the same export results as with TExtra (of course, that being said, we are not looking to support the very old export formats like Quattro, LotusNotes, DotMatrix supported by TExtra).

My question is: Will upgrading the RB with Delphi Tokyo suffice the need for exporting popular formats like PDF, XL, DOC or HTML without TExtra?

Comments

  • Hi Steve,

    In short, yes :smile: .

    ReportBuilder currently contains built-in support for the following export file formats: Report Archive, PDF, PDF/A-(1, 2, 3, 3-ZUGFeRD), Text, HTML, RTF, DOC, XLS, XLSX, Image (BMP, Metafile, JPEG, GIF, PNG, TIFF).

    We are constantly updating and enhancing these file devices so over the years they have far surpassed the capability of ExtraDevices.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2018
    Thank you Nico, for your prompt response.

    Upon further digging into the old code revealed that there is a custom component we use, derived from TPDFDevice (one of the TExtra defined classes). Following piece of code should give you the idea how we are using it to produce PDF file:

    AProducer.AllowPrintToFile := True; // AProduce is of TppProducer
    AProducer.ShowPrintDialog := False;
    Archiver := TCustomPDFDevice .Create(nil); // TCustomPDFDevice = class(TPDFDevice)
    try
    Archiver.UseGlobalOptions := False;
    Archiver.Options.AutoEmbedFonts := True;
    Archiver.Options.FontsToEmbed.Append('Arial Black Tropical');
    Archiver.Options.Permissions := [ppPrint,ppCopy,ppModifyAnnot];
    Archiver.FileName := AFileName;
    Archiver.Publisher := AProducer.Publisher;
    Archiver.ReportFilter := AFilters; // This is a custom property
    AProducer.DeviceType := 'PDFFile';
    AProducer.PrintToDevices;
    finally
    Archiver.Free;
    end;

    FYI: The TCustomPDFDevice class overrides the procedure ReceivePage(aPage: TppPage); making use of the custom proerty set in above code.

    Could you please suggest how to move forward in the absence of TPDFDevice if we re-write for upgrade?
  • Hi Steve,

    The only "custom" aspect I see in your code is the ReportFilter property. I would need more information about this to understand what it does.

    All other aspects of your code can be achieved with the built in PDF device.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.