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

How to use Pragnaan and Weler together

edited July 2004 in End User
As you probably know Pragnaan plugin is better option for Excel, Word and
RTF export (export is really like Report in RB). Waler is much better for
PDF export (national support with subset not the whole font embeded).

How to use them with the same TppReport component in a way that is
mentioned above:
Excel, RTF, Word----Pragnaan
PDF-----------------Weler (TExtradevice)


THX!


--
Benjamin Vadas

Comments

  • edited July 2004

    You can control which output devices are available by
    registering/uregistering the device classes.

    For an example, check out RBuilder\Source\ppFilDev.pas. The
    initialization/finalization sections. There will be similar registrations in
    the source code for Waler and Pragnaan. You will want to add UnRegister
    calls in the form create of your application.

    example:

    uses
    ppDevice;

    ppUnRegisterDevice(TppTextFileDevice);
    ppUnRegisterDevice(TppReportTextFileDevice);
    ppUnRegisterDevice(TppArchiveDevice);



    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2004
    Dear NArd,

    Thank You for an answer.

    What I want is a mechanism that will operate after user choose in Print
    dialog certain type of export to file (RTF, Excel or PDF).

    I think that your suggestion is not available in that moment... How to
    react on user input in that moment?

    THX!

    Ben

  • edited July 2004

    The Print dialog displays the list of registered export devices. The user is
    actually choosing a device. If you have the proper devices registered, then
    they will be displayed in the Print dialog and that is all that is required.
    (i.e. you should only have the devices registered that you want the user to
    be able to choose.)



    --


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2004

    On Wed, 28 Jul 2004 11:53:55 -0600, Nard Moseley (Digital Metaphors)
  • edited July 2004

    It would be simpler to implement the solution as I have described.

    However, you can use the Report.OnPrintDialogClose event to do something
    like this:

    uses
    ppForms,
    ppFilDev;

    if (ppReport1.PrintDialog.ModalResult = mrOK) and
    (ppReport1.PrintDialog.PrintToFile) then
    begin
    if (ppReport1.PrintDialog.DeviceType = TppTextFileDevice.DeviceName)
    then
    ppReport1.PrintDialog.DeviceType :=
    TppReportTextFileDevice.DeviceName;

    end;





    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2004
    Dear Nard,
    If I have understand You good this is the situation:
    1) register both (Waler and Pragnaan)
    2) After user choose in Print dialog some Export device, in
    AfterDialogClose event assign right device.

    Am I right? This means that both Exportdevices are installed in the same
    time ?

    THX!

    On Thu, 29 Jul 2004 09:39:30 -0600, Nard Moseley (Digital Metaphors)
  • edited August 2004

    Correct. Use the Report.OnPrintDialogClose event as I show in the
    example....

    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.