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 1:02AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.