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

RB 20.03 How to remove export type

Delphi 10.2 toyko RB 20.0

if ShowPrintDialog then
begin
ppReportBodyPiercerRTF.ShowPrintDialog := true;
end
else
begin
ppReportBodyPiercerRTF.DeviceType := PDF_EXT;
ppReportBodyPiercerRTF.ShowPrintDialog := False;
end;


We would like to show
1. excel
2. PDF
3. Word (docx)
4....

thanks

Jim Rodimon
State of Maine

Comments

  • Hi Jim,

    See the following article on how to remove export formats.

    http://rbwiki.digital-metaphors.com/output/overview/removing-formats/


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Thanks but this is not working as I thought. When i print, the dialog pops up then i click export and all the file types are still there. It is simple to reproduce.

    ppUnRegisterDevice(TppTextFileDevice);
    ppUnRegisterDevice(TppReportTextFileDevice);
    ppUnRegisterDevice(TppArchiveDevice);
    ppUnRegisterDevice(TppReportTextFileDevice);
    ppUnRegisterDevice(TppImageDevice);
  • Please disregard.
  • I do have concern or a bit of confusion. Below is my list of devices, it has all I could find.
    ppUnRegisterDevice(TppTextFileDevice);
    ppUnRegisterDevice(TppReportTextFileDevice);
    ppUnRegisterDevice(TppArchiveDevice);
    ppUnRegisterDevice(TppImageDevice);
    ppUnRegisterDevice(TppPDFA2Device);
    ppUnRegisterDevice(TppPDFA3Device);
    ppUnRegisterDevice(TppPDFA3ZFDevice); //
    ppUnRegisterDevice(TppPDFADevice);
    ppUnRegisterDevice(TppHtmlDevice);
    ppUnRegisterDevice(TppBMPDevice);
    ppUnRegisterDevice(TppMetafileDevice);
    ppUnRegisterDevice(TppJPGDevice);
    ppUnRegisterDevice(TppGIFDevice);
    ppUnRegisterDevice(TppPNGDevice);
    ppUnRegisterDevice(TppXLSDataDevice);
    ppUnRegisterDevice(TppXLSReportDevice);
    ppUnRegisterDevice(TppgraphicsDevice);

    But when I hit export i still get the following list of unwanted devices.
    XLSX Data Fial
    XLSX Report File
    TIFF File (pptiffdevice toss an error when I add to uses)
    Lotus File
    Quattro File
    HTML File
    XHTML File
    Rtf file 2nd occurrence
    PDF File 2nd Occurrence

    uses
    System.SysUtils, System.Classes, Data.DB,
    ppDB, ppDBPipe, ppParameter, ppBands, Vcl.Imaging.pngimage, ppDesignLayer,
    Vcl.Imaging.jpeg, ppCtrls, ppTableGrid, ppStrtch, ppMemo, ppVar, ppReport,
    ppPrnabl, ppClass, ppSubRpt, ppCache, ppComm, ppRelatv, ppProd,ppPDFDevice,
    ppRichTx,ppWWRichEd, ComCtrls,dateutils, ppFilDev, ppPageBreak, ppdevice,ppImageDevice,
    ppPDFA2Device, ppPDFA3Device, ppPDFA3ZFDevice,ppPDFADevice, ppHtmlDevice, ppgraphicsDevice,
    ppXLSDevice,ppWicDevice;

    Thanks in advance
  • Hi Jim,

    1. Use the Delphi Search | Find in Files dialog to search for 'ppRegisterDevice' against the RBuilder\Source directory. This will will find all units/occurrences.

    2. It appears you have an old 3rd party library somewhere in your project - could be in the project source file 'uses' or one of the other units. Most likely TXtraDevices. Devices such as Lotus, Quattro were never part of RB. And the 2nd occurrence of some export types is another clue.


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Thanks! I was wondering about something like that.

    have a fantastic weekend

    Jim
  • I removed TXtraDevices it was an artifact. now it works as i expected.

    thanks Jim
Sign In or Register to comment.