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

Print to devices with Pragnaan components

edited January 2010 in Devices
Hello, all right?
I'm doing a test with the component export partner of Digital Metaphors,
PsExportDevices of Pragnaan.
In tests I could not do the export file without having to see the setup
screen printing. In this case, when I press the button of this action, I
just generate the files with the format I specified, but without the User
view.

Sample code (just to show best)
RbExportMasterControl.JPEG.ShowSetupDialog: = False;
RbExportMasterControl.JPEG.ShowProgress: = True;

JBReport1.ModalPreview: = False;
JBReport1.ShowPrintDialog: = False;
JBReport1.PrintDialog.PrintToFile: = True;
JBReport1.PrintDialog.DeviceType: = 'jpg Image File';
JBReport1.TextFileName: = 'C: \ Exp \ test1.jpg';
JBReport1.Print;

Grateful if they can help.

Comments

  • edited January 2010
    Hello,

    For future reference, please use your real name when posting to these
    newsgroups.


    I'm a bit unclear about the issue.

    Do you mean that when you print, you are getting the preview window instead
    of directly exporting to file? If so, you first need to be sure the
    DeviceType property is properly set. If this value is incorrect, the
    default device will be used (screen). Also if you are loading templates,
    you need to be sure you set the device type after one has been loaded.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2010
    Hi Nico, I changed my name for this newsgroup.

    I´ll try export report to Jpeg files without show the print dialog. With I
    use the Pragnaam Export Devices to export reports I not found the
    sample or code for this action.

    In Samples of Report Builder using the native export method to PDF file, the
    code is:

    ppReport1.DeviceType := 'PDF';
    ppReport1.ShowPrintDialog := False;
    ppReport1.ShowCancelDialog := False;
    ppReport1.TextFileName := 'MyReport.pdf';
    ppReport1.Print;

    The before code export report to PDF Formatt without show the Print Dialog.
    My intention is export to all Pragnaam Formatts without show de print
    dialog, but I not found samples about this and the DeviceType about export
    Format.

    Example:

    1) Export to Jpeg file
    ppReport1.DeviceType := 'JPG';
    ppReport1.ShowPrintDialog := False;
    ppReport1.ShowCancelDialog := False;
    ppReport1.TextFileName := 'MyReport.jpg';
    ppReport1.Print;

    2) Export to Rtf file:
    ppReport1.DeviceType := 'RTF';
    ppReport1.ShowPrintDialog := False;
    ppReport1.ShowCancelDialog := False;
    ppReport1.TextFileName := 'MyReport.rtf';
    ppReport1.Print;

    Thank you very much if you help me.

    Regarts,

    Eliseu.

  • edited January 2010
    Hi Nico,

    Sorry about this doubt. I found the solution.

    In PsRBRoutines.pas exists methods to export.

    Examples:

    ExportToPDF(ppReport1, 'Sample.pdf');
    ExportToHTML(ppReport1, 'Sample.htm');
    ExportToXHTML(ppReport1, 'Sample.xht');
    ExportToRTF(ppReport1, 'Sample.rtf');
    ExportToExcel(ppReport1, 'Sample.xls');
    ExportToGIF(ppReport1, 'Sample.gif');
    ExportToJPEG(ppReport1, 'Sample.jpg');
    ExportToBMP(ppReport1, 'Sample.bmp');
    ExportToEMF(ppReport1, 'Sample.emf');
    ExportToWMF(ppReport1, 'Sample.wmf');

    Thanks for your attention.

    Eliseu.

This discussion has been closed.