Solved

How to export records from Tlistview to a HTML format report?

Posted on 2000-04-01
2
147 Views
Last Modified: 2010-04-04
I write a ap. and generate some records
stored in Tlistview, I wonder how to
export these records from Tlistview to
a HTML format report?

Rgds

Chiwan
0
Comment
Question by:chiwan
2 Comments
 
LVL 15

Expert Comment

by:simonet
Comment Utility
How are the record stored?
0
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
Comment Utility
hi,
something like this:

procedure TForm1.Button1Click(Sender: TObject);
var
sl : tstringlist;
i : integer;
begin
sl := tstringlist.create;
sl.add('<HTML>');
sl.add('<HEAD>');
sl.add('<TITLE>');
sl.add('My Report');
sl.add('</TITLE>');
sl.add('</HEAD>');
sl.add('<BODY>');
for i := 0 to listview1.items.Count -1 do
begin
sl.add('<li>' + listview1.Items[i].Caption);
end;
sl.add('</BODY>');
sl.add('</HTML>');
sl.SaveToFile('c:\myreport.html');
sl.free;
sl := nil;
end;
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now