Home RAP

Change Report.TextFileName with information from the datapipeline

edited December 2008 in RAP
Hi,

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

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

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

Regards,
Jeroen R?ttink.

Comments

  • 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.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.