Home RAP

Change Report.TextFileName with information from the datapipeline

edited December 2008 in RAP

I use the following code to change the output filename from RAP:

procedure ReportOnInitializeParameters(var aCancel: Boolean);
var Filename : string;
Filename := 'Leveranciersbeoordeling';
Report.TextFileName := ExchangeFileName( Report.TextFileName, Filename );

The idea is that the enduser could set the filename based on information
from the datapipeline (eg. supplier name).
I tried using ReportAfterOpenDataPipelines() but that event seems to fire to
late to change the filename.

Is this somehow possible from RAP?

Using RB10.09 / D7

Jeroen R?ttink.


  • edited December 2008
    Hi Jeroen,

    Once the datapipelines have been opened, the file stream has already been
    created so it is not possible to rename the text file at that time. The
    only option would be to possibly create a pass-thru function that accesses
    your dataset manually from Delphi to retrieve the file name and set the
    TextFileName property from the OnInitializeParameters event.


    Nico Cizik
    Digital Metaphors

    Best Regards,

    Nico Cizik
    Digital Metaphors
This discussion has been closed.