Home Devices

PDF Filename generated when using OnGetFilesuffix

edited July 2014 in Devices
Hi,

I am using Report Builder 12.05 Enterprise.

I am generating a PDF File for each group in a report using OnGetFileSuffix
procedure.

How can I get the location and PDF Filename created in RAP?
i.e. If the File suffix is Invoice_55_Customer_33 I would like to know also
the folder
( c:\temp\invoices\Inv_Invoice_55_Customer_33.pdf )

Is there a way to know the FileName created using RAP?

Thanks,

Jose Maria Sanmartin

Comments

  • edited July 2014
    Hi Jose,

    You can use the Report.FileDevice.FileName property to obtain the
    initial file name and path to be used when exporting each group.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2014
    Thanks Nico,

    But using

    ShowMessage(Report.FileDevice.Filename);

    in RAP I get this error:

    Expected: '(' or '[', but Filename was found instead.

    Should I use a passthrough function to get access to Report.FileDevice?

    Thanks,

    José María Sanmartín


  • edited July 2014
    Report.FileDevice have to work fine.
    Your problem is with FileName property of FileDevice.
    This property was published in RB 14 only.
    So your code work without problems in RB 14 and later.

    Rather than create your passthrough function, I recommend just creating a
    RTTI class for TppFileDevice. Then your RAP code can use FileName and
    later you can remove this custom RTTI for RB 14.



    On Mon, 14 Jul 2014 09:30:49 +0300, Jose Maria Sanmartin
  • edited July 2014
    Thanks

  • edited July 2014
    Hi Jose,

    ReportBuilder has continued to evolve a long way since RB 12.x or earlier.

    Please consider upgrading your ReportBuilder license regularly to take
    advantage of this an hundreds of other improvements and enhancements. We
    are a small team, the revenue from the product goes back into supporting
    the RB community with tech support, bug fixes, and adding requested
    features. We have a number of products we use here and upgrade them
    every year, the authors are important to our business and we know they
    need the support. It’s a win/win situation.

    Here is a link to What's New for RB 15. (Use the side menu to see what
    was new for prior releases)

    http://www.digital-metaphors.com/rbWiki/General/What's_New/RB_15

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2014
    Hi,

    I have created a RTTI class for TppFileDevice with access to property
    FileName.

    When is the Filename changed after using OnGetfileSuffix and what method
    should I use in RAP once FileName is setted?

    Thanks,

    Jose Maria Sanmartin

    "Dima" escribi? en el mensaje
  • edited July 2014
    Hi.

    FileDevice.FileName do not change immediately after OnGetfileSuffix event.
    This happens later, when device receive the Page (in
    FileDevice.ReceivePage method).

    No special method (event) available in RAP that raised on Filename changed.

    But what is your problem? What you want to do?

    On Fri, 18 Jul 2014 19:56:28 +0300, Jose Maria Sanmartin
  • edited July 2014
    Thanks Dima,

    I will check with ReceivePage method.

    I want to generate a range of invoices in Pdf and then create an script to
    send them by email (every invoice for each customer). For that I need to
    know the PDF file name generated for every invoice.
    As far as I know, ReportBuilder only sends 1 email for every report
    generated, so I try to create a script to send the emails all at once.
    Something like:

    mailto: -address -subject -attach.


    Regards,

    Jose Maria Sanmartin
    "Dima" escribio en el mensaje de noticias
  • edited July 2014
    I make something like this in my application.
    If you need, I can try make some example for you some more later.

    On Tue, 22 Jul 2014 14:49:16 +0300, Jose Maria Sanmartin
  • edited July 2014
    Thanks Dima,

    If it is no problem for you and it doesn't take too much of your time, you
    can make an example for me.
    Don't worry if you can't, because I am not at all convinced that this is the
    way that I am going to implement it. Only if the solution save time to the
    customer I would use it.

    You can send it to chema at patopatin.com.

    Thanks again,

    Jose Maria Sanmartin
    "Dima" escribio en el mensaje de noticias
This discussion has been closed.