Change Report.TextFileName with information from the datapipeline
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.
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.
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com