Reputation: 9094
I was, until now, unable to find or create a good component to print the result of a TDBGrid
, so what I did was to create a couple of for ... do
and then save the result in a text file and opened right after with Notepad, so the user could print or save from there. Pretty ugly, right?
Now it just came to me that I could use those loops to create HTML code instead, which is more presentable. But how can I use, for example a TWebBrowser
or something else to show that result instead of the TDBGrid
approach?
And how can I print this HTML (with or without the TWebBrowser
, as for example if I still use the TDBGrid
to show the report and the HTML approach just if the user wants to print it)?
Upvotes: 3
Views: 1277
Reputation: 43033
You can use either
I like very much THtmlViewer
since it won't depend on the IE installation, is pretty fast and has good printing abilities. You can even export to pdf if needed, using e.g. Open Source SynPdf unit.
Upvotes: 2