Export the Prepared Report to HTML

Hi all,

here is the scenario

i put TFrhtml2report icon along with the other report related icons on my data module.



and i did coding like this


dataModule.AmiReportQuery.SQL.clear();
dataModule.AmiReportQuery.SQL.Add(strSQl );
datamodule.AmiFastReport.LoadFromFile('client-transhistory.frf');
//datamodule.AmiFastReport.ShowReport;
datamodule.AmiFastReport.PrepareReport;
//datamodule.AmiFastReport.ShowPreparedReport ;
dataModule.AmiFastReport.ExportTo(frHTML2Export1,'test.htm');

Showprepared Report is working.

but if i try to export, application is giving problem saying that illegal memory access and then it terminates.

What is the problem ;)

thanks
Koundinya

Comments

  • edited 8:25PM
    Hi,


    Change

    dataModule.AmiFastReport.ExportTo(frHTML2Export1,'test.htm');

    by


    For i:=0 to frFiltersCount-1 do
    if lowercase(ExtractFileExt(frFilters.FilterExt))='.htm'
    then dataModule.AmiFastReport.ExportTo(frFilters.ClassRef,'test.htm');



    bye
    boanerges junior

Leave a Comment