?
Solved

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

Posted on 2000-04-01
2
Medium Priority
?
158 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
ID: 2676213
How are the record stored?
0
 
LVL 17

Accepted Solution

by:
inthe earned 400 total points
ID: 2676255
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

840 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